Skip to content

Commit 22bed89

Browse files
authored
Merge pull request #740 from solid/vary-accept
Add Vary: Accept header
2 parents 26c60d8 + 029aab7 commit 22bed89

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/create-app.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,11 @@ function initHeaders (app) {
120120
app.use(corsSettings)
121121

122122
app.use((req, res, next) => {
123-
// Set X-Powered-By
124123
res.set('X-Powered-By', 'solid-server')
124+
125+
// Cors lib adds Vary: Origin automatically, but inreliably
126+
res.set('Vary', 'Accept, Authorization, Origin')
127+
125128
// Set default Allow methods
126129
res.set('Allow', 'OPTIONS, HEAD, GET, PATCH, POST, PUT, DELETE')
127130
next()

0 commit comments

Comments
 (0)