Add example .env var, fix linting
This commit is contained in:
@@ -18,3 +18,4 @@ CONFIG_ENABLED_APPS="news,notes,photos" # dashboard and files cannot be disabled
|
|||||||
CONFIG_FILES_ROOT_PATH="data-files"
|
CONFIG_FILES_ROOT_PATH="data-files"
|
||||||
CONFIG_ENABLE_EMAILS="false" # if true, email verification will be required for signups (using Brevo)
|
CONFIG_ENABLE_EMAILS="false" # if true, email verification will be required for signups (using Brevo)
|
||||||
CONFIG_ENABLE_FOREVER_SIGNUP="true" # if true, all signups become active for 100 years
|
CONFIG_ENABLE_FOREVER_SIGNUP="true" # if true, all signups become active for 100 years
|
||||||
|
# CONFIG_ALLOWED_COOKIE_DOMAINS="example.com,example.net" # can be set to allow more than the BASE_URL's domain for session cookies
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export function isAppEnabled(app: 'news' | 'notes' | 'photos') {
|
|||||||
|
|
||||||
export function isCookieDomainAllowed(domain: string) {
|
export function isCookieDomainAllowed(domain: string) {
|
||||||
const allowedDomains = (Deno.env.get('CONFIG_ALLOWED_COOKIE_DOMAINS') || '').split(',') as typeof domain[];
|
const allowedDomains = (Deno.env.get('CONFIG_ALLOWED_COOKIE_DOMAINS') || '').split(',') as typeof domain[];
|
||||||
|
|
||||||
if (allowedDomains.length === 0) {
|
if (allowedDomains.length === 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user