Reduce hard coding of LOCAL_DOMAIN
env value throughout tests (#35025)
This commit is contained in:
parent
f92ff6d699
commit
ab7f50ce4e
15 changed files with 69 additions and 37 deletions
|
@ -25,7 +25,15 @@ RSpec.describe 'Remote Interaction Helper' do
|
|||
|
||||
def expected_csp_headers
|
||||
<<~CSP.squish
|
||||
default-src 'none'; frame-ancestors 'self'; form-action 'none'; script-src 'self' https://cb6e6126.ngrok.io 'wasm-unsafe-eval'; connect-src https:
|
||||
default-src 'none';
|
||||
frame-ancestors 'self';
|
||||
form-action 'none';
|
||||
script-src 'self' #{local_domain} 'wasm-unsafe-eval';
|
||||
connect-src https:
|
||||
CSP
|
||||
end
|
||||
|
||||
def local_domain
|
||||
root_url(host: Rails.configuration.x.local_domain).chop
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue