DEV: apply allow origin response header for CDN requests. (#11893)

Currently, it creates a CORS error while accessing those static files.
This commit is contained in:
Vinoth Kannan
2021-01-29 07:44:49 +05:30
committed by GitHub
parent 4af4d36175
commit a5923ad603
12 changed files with 62 additions and 6 deletions

View File

@ -11,7 +11,7 @@ class ThemeJavascriptsController < ApplicationController
only: [:show]
)
before_action :is_asset_path, :no_cookies, only: [:show]
before_action :is_asset_path, :no_cookies, :apply_cdn_headers, only: [:show]
def show
raise Discourse::NotFound unless last_modified.present?