Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d8dc442f
Commit
d8dc442f
authored
Oct 07, 2021
by
Axel García
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pipeline failures
parent
5c720cf2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
spec/lib/gitlab/content_security_policy/config_loader_spec.rb
.../lib/gitlab/content_security_policy/config_loader_spec.rb
+4
-4
No files found.
spec/lib/gitlab/content_security_policy/config_loader_spec.rb
View file @
d8dc442f
...
...
@@ -56,22 +56,22 @@ RSpec.describe Gitlab::ContentSecurityPolicy::ConfigLoader do
context
'adds all websocket origins to support Safari'
do
it
'with insecure domain'
do
stub_config_setting
(
host:
'example.com'
,
https:
false
)
expect
(
directives
[
'connect_src'
]).
to
eq
(
"'self' ws://example.com"
)
expect
(
directives
[
'connect_src'
]).
to
eq
(
"'self'
https://cdn.cookielaw.org
ws://example.com"
)
end
it
'with secure domain'
do
stub_config_setting
(
host:
'example.com'
,
https:
true
)
expect
(
directives
[
'connect_src'
]).
to
eq
(
"'self' wss://example.com"
)
expect
(
directives
[
'connect_src'
]).
to
eq
(
"'self'
https://cdn.cookielaw.org
wss://example.com"
)
end
it
'with custom port'
do
stub_config_setting
(
host:
'example.com'
,
port:
'1234'
)
expect
(
directives
[
'connect_src'
]).
to
eq
(
"'self' ws://example.com:1234"
)
expect
(
directives
[
'connect_src'
]).
to
eq
(
"'self'
https://cdn.cookielaw.org
ws://example.com:1234"
)
end
it
'with custom port and secure domain'
do
stub_config_setting
(
host:
'example.com'
,
https:
true
,
port:
'1234'
)
expect
(
directives
[
'connect_src'
]).
to
eq
(
"'self' wss://example.com:1234"
)
expect
(
directives
[
'connect_src'
]).
to
eq
(
"'self'
https://cdn.cookielaw.org
wss://example.com:1234"
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment