DEV: enable cors to all cdn get requests from workbox. (#10685)

Now all external requests from the service worker will be in CORS mode without credentials.
This commit is contained in:
Vinoth Kannan
2020-10-28 23:36:19 +05:30
committed by GitHub
parent f70042860b
commit e3de45359f
21 changed files with 391 additions and 8 deletions

View File

@ -737,6 +737,17 @@ RSpec.describe ApplicationController do
end
end
context "cdn requests" do
before do
GlobalSetting.stubs(:cdn_url).returns("https://www.example.com/")
end
it "should block the dynamic routes" do
get "/"
expect(response.status).to eq(404)
end
end
context "set_locale_from_accept_language_header enabled" do
context "accept-language header differs from default locale" do
before do