caddy: CORS
This commit is contained in:
@@ -19,6 +19,11 @@ caddy_global_sites_defaults:
|
||||
# query [key]
|
||||
# header [field]
|
||||
# cookie [<name> [<secret>]]
|
||||
|
||||
|
||||
# Filters
|
||||
filter_blacklist: [] # Superseeds filter_whitelist
|
||||
filter_whitelist: ["127.0.0.1"]
|
||||
|
||||
|
||||
# Custom TLS certificate
|
||||
@@ -27,10 +32,27 @@ caddy_global_sites_defaults:
|
||||
custom_cert_key_file: ""
|
||||
|
||||
|
||||
# Filters
|
||||
filter_blacklist: [] # Superseeds filter_whitelist
|
||||
filter_whitelist: ["127.0.0.1"]
|
||||
|
||||
# CORS - Cross Origin Resource Sharing
|
||||
cors: false
|
||||
cors_allow_origins: null # Mandatory
|
||||
cors_allow_methods:
|
||||
- "GET"
|
||||
- "HEAD"
|
||||
- "POST"
|
||||
- "OPTIONS"
|
||||
cors_allow_headers:
|
||||
- "Cache-Control"
|
||||
- "Content-Type"
|
||||
- "If-Modified-Since"
|
||||
- "Range"
|
||||
- "User-Agent"
|
||||
cors_max_age: 3600
|
||||
cors_allow_credentials: false
|
||||
cors_vary:
|
||||
- "Origin"
|
||||
cors_expose_headers:
|
||||
- "Content-Length"
|
||||
- "Content-Range"
|
||||
|
||||
# Security headers
|
||||
header_content_security_policy:
|
||||
@@ -391,7 +413,3 @@ caddy_global_sites_defaults:
|
||||
geoip: false
|
||||
geoip_debug: false
|
||||
geoip_filter_expression: '{geoip2.country_code} == "UNK"'
|
||||
# geoip_deny_countries: [] # ISO country codes (2 letters), "UNK" for unknown country
|
||||
# geoip_allow_countries: [] # ISO country codes (2 letters), "UNK" for unknown country
|
||||
# geopip_deny_asn: []
|
||||
# geopip_allow_asn: []
|
||||
|
||||
Reference in New Issue
Block a user