mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 10:58:48 +08:00
Add a global setting for CDN origin
This is so that, on a multisite cluster, when we handle a CDN request, the hostname that is requested corresponds to one of the sites - specifically the default site.
This commit is contained in:
@ -140,6 +140,7 @@ class GlobalSetting
|
|||||||
hostnames << backup_hostname if backup_hostname.present?
|
hostnames << backup_hostname if backup_hostname.present?
|
||||||
|
|
||||||
hostnames << URI.parse(cdn_url).host if cdn_url.present?
|
hostnames << URI.parse(cdn_url).host if cdn_url.present?
|
||||||
|
hostnames << cdn_origin_hostname if cdn_origin_hostname.present?
|
||||||
|
|
||||||
hash["host_names"] = hostnames
|
hash["host_names"] = hostnames
|
||||||
hash["database"] = db_name
|
hash["database"] = db_name
|
||||||
|
@ -96,6 +96,9 @@ load_mini_profiler = true
|
|||||||
# recommended, cdn used to access assets
|
# recommended, cdn used to access assets
|
||||||
cdn_url =
|
cdn_url =
|
||||||
|
|
||||||
|
# The hostname used by the CDN to request assets
|
||||||
|
cdn_origin_hostname =
|
||||||
|
|
||||||
# comma delimited list of emails that have developer level access
|
# comma delimited list of emails that have developer level access
|
||||||
developer_emails =
|
developer_emails =
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user