solid-server 5.7.0 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/create-app.js +1 -1
- package/lib/handlers/cors-proxy.js +1 -1
- package/lib/handlers/get.js +2 -0
- package/lib/handlers/patch.js +1 -0
- package/lib/handlers/put.js +1 -0
- package/package.json +1 -1
package/lib/create-app.js
CHANGED
|
@@ -32,7 +32,7 @@ const corsSettings = cors({
|
|
|
32
32
|
methods: [
|
|
33
33
|
'OPTIONS', 'HEAD', 'GET', 'PATCH', 'POST', 'PUT', 'DELETE'
|
|
34
34
|
],
|
|
35
|
-
exposedHeaders: 'Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, X-Powered-By',
|
|
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',
|
|
36
36
|
credentials: true,
|
|
37
37
|
maxAge: 1728000,
|
|
38
38
|
origin: true,
|
|
@@ -13,7 +13,7 @@ const validUrl = require('valid-url')
|
|
|
13
13
|
|
|
14
14
|
const CORS_SETTINGS = {
|
|
15
15
|
methods: 'GET',
|
|
16
|
-
exposedHeaders: 'Authorization, User, Location, Link, Vary, Last-Modified, Content-Length, Content-Location, X-Powered-By',
|
|
16
|
+
exposedHeaders: 'Authorization, User, Location, Link, Vary, Last-Modified, Content-Length, Content-Location, MS-Author-Via, X-Powered-By',
|
|
17
17
|
maxAge: 1728000,
|
|
18
18
|
origin: true
|
|
19
19
|
}
|
package/lib/handlers/get.js
CHANGED
|
@@ -27,6 +27,8 @@ async function handler (req, res, next) {
|
|
|
27
27
|
const requestedType = negotiator.mediaType()
|
|
28
28
|
const possibleRDFType = negotiator.mediaType(RDFs)
|
|
29
29
|
|
|
30
|
+
res.header('MS-Author-Via', 'SPARQL')
|
|
31
|
+
|
|
30
32
|
// Set live updates
|
|
31
33
|
if (ldp.live) {
|
|
32
34
|
res.header('Updates-Via', ldp.resourceMapper.resolveUrl(req.hostname).replace(/^http/, 'ws'))
|
package/lib/handlers/patch.js
CHANGED
|
@@ -23,6 +23,7 @@ const DEFAULT_FOR_NEW_CONTENT_TYPE = 'text/turtle'
|
|
|
23
23
|
// Handles a PATCH request
|
|
24
24
|
async function patchHandler (req, res, next) {
|
|
25
25
|
debug(`PATCH -- ${req.originalUrl}`)
|
|
26
|
+
res.header('MS-Author-Via', 'SPARQL')
|
|
26
27
|
try {
|
|
27
28
|
// Obtain details of the target resource
|
|
28
29
|
const ldp = req.app.locals.ldp
|
package/lib/handlers/put.js
CHANGED