Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
added camouflage-rewrite middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
bergos committed Dec 2, 2016
1 parent fe0b792 commit 161a2ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = function (config) {
var bodyParser = require('body-parser')
var express = require('express')
var handlerMiddleware = require('./lib/handler-middleware')
var rewrite = require('camouflage-rewrite')
var patchHeaders = require('patch-headers')
var morgan = require('morgan')
var path = require('path')
Expand Down Expand Up @@ -35,6 +36,8 @@ module.exports = function (config) {
}

app.use(morgan('combined'))
app.use(absoluteUrl())
app.use(rewrite(config.rewrite))
app.use(patchHeaders(config.patchHeaders))
app.use(bodyParser.text())
app.use(bodyParser.urlencoded({extended: false}))
Expand All @@ -50,8 +53,6 @@ module.exports = function (config) {
// yasgui files
app.use('/sparql/dist/', express.static(path.resolve(require.resolve('yasgui'), '../../dist/')))

app.use(absoluteUrl())

if (config.sparqlProxy) {
app.use(config.sparqlProxy.path, sparqlProxy(config.sparqlProxy.options))
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"absolute-url": "^1.2.0",
"body-parser": "^1.15.2",
"bunyan": "^1.8.4",
"camouflage-rewrite": "^1.0.0",
"express": "^4.14.0",
"express-negotiate": "^0.0.5",
"http-errors": "^1.5.1",
Expand Down

0 comments on commit 161a2ba

Please sign in to comment.