mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 13:35:40 +00:00
Use whitenoise for static file handling (#6662)
* Update config_template.yaml file * Adjust ALLOWED_HOSTS behaviour - Only add wildcard * in DEBUG mode - Exit if ALLOWED_HOSTS not defined * Tweak error message * Use whitenoise for serving static files - Any requests to /static/ are handled by whitenoise - If an external reverse proxy (e.g. Caddy) is being used, this will not make a difference * Update python package requirements * Add extra log output * Update ENV for CI checks * Updates - Thow error but do not exit - Revert CI changes
This commit is contained in:
@ -163,14 +163,14 @@ auto_update: False
|
||||
# Allowed hosts (see ALLOWED_HOSTS in Django settings documentation)
|
||||
# A list of strings representing the host/domain names that this Django site can serve.
|
||||
# Default behaviour is to allow all hosts (THIS IS NOT SECURE!)
|
||||
allowed_hosts:
|
||||
- '*'
|
||||
# allowed_hosts:
|
||||
# - '*'
|
||||
|
||||
# Trusted origins (see CSRF_TRUSTED_ORIGINS in Django settings documentation)
|
||||
# If you are running behind a proxy, you may need to add the proxy address here
|
||||
trusted_origins:
|
||||
- 'http://localhost:8000'
|
||||
|
||||
# trusted_origins:
|
||||
# - 'http://localhost'
|
||||
# - 'http://*.localhost'
|
||||
|
||||
# Proxy forwarding settings
|
||||
# If InvenTree is running behind a proxy, you may need to configure these settings
|
||||
@ -183,13 +183,16 @@ use_x_forwarded_port: false
|
||||
|
||||
# Cross Origin Resource Sharing (CORS) settings (see https://github.com/adamchainz/django-cors-headers)
|
||||
cors:
|
||||
allow_all: True
|
||||
allow_credentials: True,
|
||||
allow_credentials: true
|
||||
|
||||
# allow_all: false
|
||||
|
||||
# whitelist:
|
||||
# - https://example.com
|
||||
# - https://sub.example.com
|
||||
|
||||
# regex:
|
||||
|
||||
# MEDIA_ROOT is the local filesystem location for storing uploaded files
|
||||
#media_root: '/home/inventree/data/media'
|
||||
|
||||
|
Reference in New Issue
Block a user