mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 10:57:04 +08:00
FEATURE: Add setting to disable automatic CORS rule install in S3 buckets (#9872)
This commit is contained in:
parent
d9f915b195
commit
b48299f81c
|
@ -200,6 +200,7 @@ s3_use_iam_profile =
|
|||
s3_cdn_url =
|
||||
s3_endpoint =
|
||||
s3_http_continue_timeout =
|
||||
s3_install_cors_rule =
|
||||
|
||||
### rate limits apply to all sites
|
||||
max_user_api_reqs_per_minute = 20
|
||||
|
|
|
@ -1207,6 +1207,9 @@ files:
|
|||
s3_http_continue_timeout:
|
||||
default: 1
|
||||
hidden: true
|
||||
s3_install_cors_rule:
|
||||
default: true
|
||||
hidden: true
|
||||
s3_cdn_url:
|
||||
default: ""
|
||||
regex: '^https?:\/\/.+[^\/]$'
|
||||
|
|
|
@ -90,6 +90,8 @@ class S3Helper
|
|||
# make sure we have a cors config for assets
|
||||
# otherwise we will have no fonts
|
||||
def ensure_cors!(rules = nil)
|
||||
return unless SiteSetting.s3_install_cors_rule
|
||||
|
||||
rule = nil
|
||||
|
||||
begin
|
||||
|
|
Loading…
Reference in New Issue
Block a user