Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/create-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const corsSettings = cors({
methods: [
'OPTIONS', 'HEAD', 'GET', 'PATCH', 'POST', 'PUT', 'DELETE'
],
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',
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',
credentials: true,
maxAge: 1728000,
origin: true,
Expand Down
2 changes: 1 addition & 1 deletion lib/handlers/cors-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const validUrl = require('valid-url')

const CORS_SETTINGS = {
methods: 'GET',
exposedHeaders: 'Authorization, User, Location, Link, Vary, Last-Modified, Content-Length, Content-Location, MS-Author-Via, X-Powered-By',
exposedHeaders: 'Authorization, User, Location, Link, Vary, Last-Modified, Content-Length, Content-Location, X-Powered-By',
maxAge: 1728000,
origin: true
}
Expand Down
2 changes: 0 additions & 2 deletions lib/handlers/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ async function handler (req, res, next) {
const requestedType = negotiator.mediaType()
const possibleRDFType = negotiator.mediaType(RDFs)

res.header('MS-Author-Via', 'SPARQL')

// Set live updates
if (ldp.live) {
res.header('Updates-Via', ldp.resourceMapper.resolveUrl(req.hostname).replace(/^http/, 'ws'))
Expand Down
1 change: 0 additions & 1 deletion lib/handlers/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const DEFAULT_FOR_NEW_CONTENT_TYPE = 'text/turtle'
// Handles a PATCH request
async function patchHandler (req, res, next) {
debug(`PATCH -- ${req.originalUrl}`)
res.header('MS-Author-Via', 'SPARQL')
try {
// Obtain details of the target resource
const ldp = req.app.locals.ldp
Expand Down
1 change: 0 additions & 1 deletion lib/handlers/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const { stringToStream } = require('../utils')

async function handler (req, res, next) {
debug(req.originalUrl)
res.header('MS-Author-Via', 'SPARQL')

const contentType = req.get('content-type')
if (isAuxiliary(req)) {
Expand Down
10 changes: 0 additions & 10 deletions test/integration/header-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ describe('Header handler', () => {
request = supertest(server)
})

describe('MS-Author-Via', () => {
describeHeaderTest('read/append for the public', {
resource: '/public-ra',
headers: {
'MS-Author-Via': 'SPARQL',
'Access-Control-Expose-Headers': /(^|,\s*)MS-Author-Via(,|$)/
}
})
})

describe('WAC-Allow', () => {
describeHeaderTest('read/append for the public', {
resource: '/public-ra',
Expand Down
2 changes: 1 addition & 1 deletion test/integration/http-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('HTTP APIs', function () {
.expect('Access-Control-Allow-Origin', 'http://example.com')
.expect('Access-Control-Allow-Credentials', 'true')
.expect('Access-Control-Allow-Methods', 'OPTIONS,HEAD,GET,PATCH,POST,PUT,DELETE')
.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')
.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, X-Powered-By')
.expect(204, done)
})

Expand Down