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

@@ -13,6 +13,8 @@ class ThemeJavascriptsController < ApplicationController
before_action :is_asset_path, :no_cookies, only: [:show]
cdn_action only: [:show]
def show
raise Discourse::NotFound unless last_modified.present?
return render body: nil, status: 304 if not_modified?