diff --git a/server/routes/identities.js b/server/routes/identities.js index db76a08..7ac5eff 100755 --- a/server/routes/identities.js +++ b/server/routes/identities.js @@ -13,6 +13,7 @@ const router = express.Router(); router.put("/faces/add/:id", (req, res) => { if (!req.user.maintainer) { + console.warn(`${req.user.name} attempted to modify photos.`); return res.status(401).send("Unauthorized to modify photos."); } @@ -45,6 +46,7 @@ router.put("/faces/add/:id", (req, res) => { router.post("/", (req, res) => { if (!req.user.maintainer) { + console.warn(`${req.user.name} attempted to modify photos.`); return res.status(401).send("Unauthorized to modify photos."); } const identity = { diff --git a/src/index.js b/src/index.js index e1be483..5d40542 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,7 @@ if (process.env.NODE_ENV !== 'production') { } render( - + , document.getElementById("root") diff --git a/webpack.dev.js b/webpack.dev.js index 967dcf7..246b207 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -8,14 +8,22 @@ module.exports = merge(common, { devServer: { contentBase: path.join(__dirname, "/"), port: 8765, - publicPath: "http://localhost:8765/dist/", + publicPath: "http://localhost:8765/photos/dist/", hotOnly: true, disableHostCheck: true, historyApiFallback: true, proxy: { - "/api": "http://localhost:8123/photos", - "/photos/*": { - target: "http://localhost:8123" +// "/photos/api/*": "http://localhost:8123/", + "/photos/": { + target: "http://localhost:8123", + bypass: function(req, res, proxyOptions) { + console.log(req.url); + if (req.url == '/photos/identities') { + return 'index.html'; + } else { + return null; + } + } } }, },