Skip to content

Commit 8ff47ea

Browse files
Merge pull request #1552 from NoelDeMartin/cors-powered-by
Expose X-Powered-By header
2 parents 0fb4548 + 806d2d6 commit 8ff47ea

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/create-app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const corsSettings = cors({
3232
methods: [
3333
'OPTIONS', 'HEAD', 'GET', 'PATCH', 'POST', 'PUT', 'DELETE'
3434
],
35-
exposedHeaders: 'Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, MS-Author-Via',
35+
exposedHeaders: 'Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, MS-Author-Via, X-Powered-By',
3636
credentials: true,
3737
maxAge: 1728000,
3838
origin: true,

lib/handlers/cors-proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const validUrl = require('valid-url')
1313

1414
const CORS_SETTINGS = {
1515
methods: 'GET',
16-
exposedHeaders: 'Authorization, User, Location, Link, Vary, Last-Modified, Content-Length, Content-Location, MS-Author-Via',
16+
exposedHeaders: 'Authorization, User, Location, Link, Vary, Last-Modified, Content-Length, Content-Location, MS-Author-Via, X-Powered-By',
1717
maxAge: 1728000,
1818
origin: true
1919
}

test/integration/http-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('HTTP APIs', function () {
8686
.expect('Access-Control-Allow-Origin', 'http://example.com')
8787
.expect('Access-Control-Allow-Credentials', 'true')
8888
.expect('Access-Control-Allow-Methods', 'OPTIONS,HEAD,GET,PATCH,POST,PUT,DELETE')
89-
.expect('Access-Control-Expose-Headers', 'Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, MS-Author-Via')
89+
.expect('Access-Control-Expose-Headers', 'Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, MS-Author-Via, X-Powered-By')
9090
.expect(204, done)
9191
})
9292

0 commit comments

Comments
 (0)