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

@ -7,6 +7,8 @@ class StaticController < ApplicationController
skip_before_action :preload_json, only: [:brotli_asset, :cdn_asset, :enter, :favicon, :service_worker_asset]
skip_before_action :handle_theme, only: [:brotli_asset, :cdn_asset, :enter, :favicon, :service_worker_asset]
before_action :apply_cdn_headers, only: [:brotli_asset, :cdn_asset, :enter, :favicon, :service_worker_asset]
PAGES_WITH_EMAIL_PARAM = ['login', 'password_reset', 'signup']
MODAL_PAGES = ['password_reset', 'signup']