Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
ea343fbf
Commit
ea343fbf
authored
Aug 30, 2016
by
Jeromy Johnson
Committed by
GitHub
Aug 30, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3142 from ipfs/test/CORS/defaults
test: do explicit check of CORS headers
parents
686882bd
3754803a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
test/sharness/t0112-gateway-cors.sh
test/sharness/t0112-gateway-cors.sh
+6
-4
No files found.
test/sharness/t0112-gateway-cors.sh
View file @
ea343fbf
...
...
@@ -28,10 +28,12 @@ thash='QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'
test_expect_success
"GET to Gateway succeeds"
'
curl -svX GET "http://127.0.0.1:$gwport/ipfs/$thash" 2>curl_output
'
cat
curl_output
# GET Response from Gateway should contain CORS headers
test_expect_success
"GET response for Gateway resource looks good"
'
grep "Access-Control-Allow-Origin:" curl_output &&
grep "Access-Control-Allow-Methods:" curl_output &&
grep "Access-Control-Allow-Origin:" curl_output
| grep "\*"
&&
grep "Access-Control-Allow-Methods:" curl_output
| grep " GET\b"
&&
grep "Access-Control-Allow-Headers:" curl_output
'
...
...
@@ -41,8 +43,8 @@ test_expect_success "OPTIONS to Gateway succeeds" '
'
# OPTION Response from Gateway should contain CORS headers
test_expect_success
"OPTIONS response for Gateway resource looks good"
'
grep "Access-Control-Allow-Origin:" curl_output &&
grep "Access-Control-Allow-Methods:" curl_output &&
grep "Access-Control-Allow-Origin:" curl_output
| grep "\*"
&&
grep "Access-Control-Allow-Methods:" curl_output
| grep " GET\b"
&&
grep "Access-Control-Allow-Headers:" curl_output
'
...
...
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