2018-11-21 00:01:51 +01:00
|
|
|
import os
|
|
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
2020-01-08 01:07:16 +01:00
|
|
|
### BASIC APP CONFIG
|
|
|
|
BIND_ADDRESS = '0.0.0.0'
|
|
|
|
PORT = 9191
|
|
|
|
HSTS_ENABLED = False
|
|
|
|
|
2023-02-24 23:40:00 +01:00
|
|
|
# CAPTCHA Config
|
|
|
|
CAPTCHA_ENABLE = True
|
|
|
|
CAPTCHA_LENGTH = 6
|
|
|
|
CAPTCHA_WIDTH = 160
|
|
|
|
CAPTCHA_HEIGHT = 60
|
|
|
|
CAPTCHA_SESSION_KEY = 'captcha_image'
|
|
|
|
|
2023-04-21 17:34:11 +02:00
|
|
|
SESSION_TYPE = 'sqlalchemy'
|
2023-02-24 23:40:00 +01:00
|
|
|
|
2020-01-08 01:07:16 +01:00
|
|
|
# SAML Authnetication
|
|
|
|
SAML_ENABLED = False
|
|
|
|
|
2023-05-06 21:50:58 +02:00
|
|
|
# Configuration from env vars
|
2023-12-19 18:25:44 +01:00
|
|
|
{{ range $key, $value := match "PDNS_ADMIN_" -}}
|
|
|
|
{{ $v := $value | trimAll "\"'\\" -}}
|
|
|
|
{{ if or (eq $v "True" "False" "None" "0") (ne ($v | int) 0) -}}
|
|
|
|
{{- $key | trimPrefix "PDNS_ADMIN_" }} = {{ $v }}
|
|
|
|
{{ else -}}
|
|
|
|
{{- $key | trimPrefix "PDNS_ADMIN_" }} = '{{ $v }}'
|
|
|
|
{{ end -}}
|
|
|
|
{{ end }}
|
2020-01-08 01:07:16 +01:00
|
|
|
### DATABASE CONFIG
|
2024-01-03 19:27:25 +01:00
|
|
|
SQLALCHEMY_DATABASE_URI = SQLA_DB_TYPE + '://' + SQLA_DB_USER + ':' + SQLA_DB_PASSWORD + '@' + SQLA_DB_HOST + ':' + str(SQLA_DB_PORT) + '/' + SQLA_DB_NAME
|
2018-11-21 00:01:51 +01:00
|
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = True
|