mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 21:21:19 +08:00
DEV: enable CORS to all CDN get requests from workbox. (#11896)
To prevent opaque cache files, now all the CDN files will be requested in 'cors' mode if the cdn_cors_enabled global setting is enabled. Before enabling the setting, should enable the cors in the CDN server by adding the response header `access-control-allow-origin: *` or `access-control-allow-origin: https://discourse.example.com.` And other external file requests other than CDN will not be cached if the response type is opaque.
This commit is contained in:
@ -161,6 +161,10 @@ def dependencies
|
||||
destination: 'workbox',
|
||||
public: true,
|
||||
skip_versioning: true
|
||||
}, {
|
||||
source: 'workbox-cacheable-response/build/.',
|
||||
destination: 'workbox',
|
||||
public: true
|
||||
}, {
|
||||
source: '@popperjs/core/dist/umd/popper.js'
|
||||
}, {
|
||||
|
Reference in New Issue
Block a user