mirror of
https://github.com/discourse/discourse.git
synced 2026-08-14 06:55:03 -05:00
FIX: Allow CSP to work correctly for non-default hostnames/schemes (#9180)
- Define the CSP based on the requested domain / scheme (respecting force_https) - Update EnforceHostname middleware to allow secondary domains, add specs - Add URL scheme to anon cache key so that CSP headers are cached correctly
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe ContentSecurityPolicy do
|
||||
before { ContentSecurityPolicy.base_url = nil }
|
||||
|
||||
after do
|
||||
DiscoursePluginRegistry.reset!
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user