Merge branch 'main' of https://git.d-popov.com/popov/mwhitnessing
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -33,7 +33,6 @@ next-cart-app.zip
|
||||
!public/uploads/thumb/
|
||||
certificates
|
||||
content/output/*
|
||||
baseUrl.txt
|
||||
public/content/output/*
|
||||
public/content/output/shifts 2024.1.json
|
||||
!public/content/uploads/*
|
@ -261,13 +261,13 @@ export const authOptions: NextAuthOptions = {
|
||||
};
|
||||
},
|
||||
},
|
||||
// pages: {
|
||||
// signIn: "/auth/signin",
|
||||
// signOut: "/auth/signout",
|
||||
// error: "/message", // Error code passed in query string as ?error=
|
||||
// verifyRequest: "/auth/verify-request", // (used for check email message)
|
||||
// newUser: null // If set, new users will be directed here on first sign in
|
||||
// },
|
||||
pages: {
|
||||
signIn: "/auth/signin",
|
||||
signOut: "/auth/signout",
|
||||
error: "/message", // Error code passed in query string as ?error=
|
||||
verifyRequest: "/auth/verify-request", // (used for check email message)
|
||||
newUser: null // If set, new users will be directed here on first sign in
|
||||
},
|
||||
}
|
||||
|
||||
export default NextAuth(authOptions)
|
@ -43,7 +43,6 @@ console.log("process.env.NEXT_PUBLIC_PUBLIC_URL = ", process.env.NEXT_PUBLIC_PUB
|
||||
console.log("process.env.NEXTAUTH_URL = ", process.env.NEXTAUTH_URL);
|
||||
console.log("process.env.PORT = ", process.env.PORT);
|
||||
console.log("process.env.TELEGRAM_BOT = ", process.env.TELEGRAM_BOT);
|
||||
console.log("process.env.DATABASE_URL = ", process.env.DATABASE_URL);
|
||||
console.log("process.env.DATABASE = ", process.env.DATABASE);
|
||||
console.log("process.env.APPLE_APP_ID = ", process.env.APPLE_APP_ID);
|
||||
|
||||
|
@ -77,17 +77,6 @@ exports.isValidPhoneNumber = function (phone) {
|
||||
// If neither condition is met, the phone number is invalid
|
||||
return false;
|
||||
}
|
||||
exports.setBaseUrl = function (req) {
|
||||
const protocol = req.headers['x-forwarded-proto'] || 'http';
|
||||
const host = req.headers.host;
|
||||
const baseUrl = `${protocol}://${host}`;
|
||||
|
||||
// Write the baseUrl to the file
|
||||
if (req != null) {
|
||||
fs.writeFileSync(path.join(__dirname, 'baseUrl.txt'), baseUrl, 'utf8');
|
||||
}
|
||||
return baseUrl;
|
||||
};
|
||||
|
||||
exports.getBaseUrl = function (relative = "", req = null) {
|
||||
return process.env.NEXT_PUBLIC_PUBLIC_URL + relative;
|
||||
|
Reference in New Issue
Block a user