Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated CORS headers #690

Merged
merged 3 commits into from
Oct 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/security_response_header_filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ module.exports = function addCSPHeaders(hyper, req, next, options) {
// Set up basic CORS headers
rh['access-control-allow-origin'] = '*';
rh['access-control-allow-methods'] = 'GET';
rh['access-control-allow-headers'] = 'accept, content-type';
rh['access-control-allow-headers'] =
'accept, accept-encoding, accept-language, content-type';
rh['access-control-expose-headers'] = 'etag';

// Set up security headers
Expand Down
3 changes: 2 additions & 1 deletion test/features/pagecontent/pagecontent.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ describe('item requests', function() {
assert.deepEqual(res.status, 200);
assert.deepEqual(res.headers['access-control-allow-origin'], '*');
assert.deepEqual(res.headers['access-control-allow-methods'], 'GET');
assert.deepEqual(res.headers['access-control-allow-headers'], 'accept, content-type');
assert.deepEqual(res.headers['access-control-allow-headers'],
'accept, accept-encoding, accept-language, content-type');
assert.deepEqual(res.headers['access-control-expose-headers'], 'etag');
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/features/pagecontent/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('Redirects', function() {

it('should append ?redirect=false to self-redirecting pages', function() {
return preq.get({
uri: server.config.bucketURL + '/html/User:Pchelolo%2FSelf_Redirect',
uri: server.config.labsBucketURL + '/html/User:Pchelolo%2FSelf_Redirect',
followRedirect: false
})
.then(function(res) {
Expand Down