Skip to content

Commit

Permalink
Add webpack-dev-server to csp spec
Browse files Browse the repository at this point in the history
These specs aren't super useful if they're just targeting the permissive dev configuration...
  • Loading branch information
aduth committed Dec 23, 2021
1 parent 72e1058 commit 54495cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/requests/csp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
expect(content_security_policy['media-src']).to eq("'self'")
expect(content_security_policy['object-src']).to eq("'none'")
expect(content_security_policy['script-src']).to match(
/'self' 'unsafe-eval' 'unsafe-inline' 'nonce-[\w\d=\/+]+'/,
/'self' 'unsafe-eval' 'unsafe-inline' localhost:3035 'nonce-[\w\d=\/+]+'/,
)
expect(content_security_policy['style-src']).to eq("'self' 'unsafe-inline'")
end
Expand All @@ -49,7 +49,9 @@
)
expect(content_security_policy['media-src']).to eq("'self'")
expect(content_security_policy['object-src']).to eq("'none'")
expect(content_security_policy['script-src']).to eq("'self' 'unsafe-eval' 'unsafe-inline'")
expect(content_security_policy['script-src']).to eq(
"'self' 'unsafe-eval' 'unsafe-inline' localhost:3035",
)
expect(content_security_policy['style-src']).to eq("'self' 'unsafe-inline'")
end
end
Expand Down

0 comments on commit 54495cc

Please sign in to comment.