Revert "DEV: enable cors to all cdn get requests from workbox. (#10684)" (#11076)

This reverts commit e3de45359f9bc7a71d9b8045a7e369fd0cf8f433.

We need to improve out strategy by adding a cache breaker with this change ... some assets on CDNs and clients may have incorrect CORS headers which can cause stuff to break.
This commit is contained in:
Vinoth Kannan
2020-10-30 10:35:35 +05:30
committed by GitHub
parent 347423007a
commit af4938baf1
21 changed files with 8 additions and 391 deletions

View File

@ -17,7 +17,6 @@ module Middleware
allowed_hostnames = RailsMultisite::ConnectionManagement.current_db_hostnames
requested_hostname = env[Rack::HTTP_HOST]
env[Discourse::REQUESTED_HOSTNAME] = requested_hostname
env[Rack::HTTP_HOST] = allowed_hostnames.find { |h| h == requested_hostname } || Discourse.current_hostname
@app.call(env)