add config FORCE_SERVER_NAME
This commit is contained in:
parent
2f2cd5c04a
commit
fb730baa73
2 changed files with 6 additions and 2 deletions
|
|
@ -6,6 +6,7 @@
|
||||||
- **BREAKING**: `SERVER_NAME` env variable now contains the domain name. `DOMAIN_NAME` has been removed.
|
- **BREAKING**: `SERVER_NAME` env variable now contains the domain name. `DOMAIN_NAME` has been removed.
|
||||||
- libsuou bumped to 0.6.0
|
- libsuou bumped to 0.6.0
|
||||||
- Added several REST routes. Change needed due to pending frontend separation.
|
- Added several REST routes. Change needed due to pending frontend separation.
|
||||||
|
- Deprecated the old web routes except for `/report` and `/admin`
|
||||||
|
|
||||||
## 0.4.0
|
## 0.4.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ from suou import twocolon_list, WantsContentType
|
||||||
|
|
||||||
from .colors import color_themes, theme_classes
|
from .colors import color_themes, theme_classes
|
||||||
|
|
||||||
__version__ = '0.5.0-dev43'
|
__version__ = '0.5.0-dev44'
|
||||||
|
|
||||||
APP_BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
APP_BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
@ -38,6 +38,7 @@ class AppConfig(ConfigOptions):
|
||||||
database_url = ConfigValue(required=True)
|
database_url = ConfigValue(required=True)
|
||||||
app_name = ConfigValue()
|
app_name = ConfigValue()
|
||||||
server_name = ConfigValue()
|
server_name = ConfigValue()
|
||||||
|
force_server_name = ConfigValue(cast=bool, default=True)
|
||||||
private_assets = ConfigValue(cast=ssv_list)
|
private_assets = ConfigValue(cast=ssv_list)
|
||||||
# deprecated
|
# deprecated
|
||||||
jquery_url = ConfigValue(default='https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js')
|
jquery_url = ConfigValue(default='https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js')
|
||||||
|
|
@ -56,7 +57,9 @@ app.secret_key = app_config.secret_key
|
||||||
app.config['SQLALCHEMY_DATABASE_URI'] = app_config.database_url
|
app.config['SQLALCHEMY_DATABASE_URI'] = app_config.database_url
|
||||||
app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False
|
app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False
|
||||||
app.config['QUART_AUTH_DURATION'] = 365 * 24 * 60 * 60
|
app.config['QUART_AUTH_DURATION'] = 365 * 24 * 60 * 60
|
||||||
app.config['SERVER_NAME'] = app_config.server_name
|
|
||||||
|
if app_config.server_name and app_config.force_server_name:
|
||||||
|
app.config['SERVER_NAME'] = app_config.server_name
|
||||||
|
|
||||||
|
|
||||||
## DO NOT ADD LOCAL IMPORTS BEFORE THIS LINE
|
## DO NOT ADD LOCAL IMPORTS BEFORE THIS LINE
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue