From 0f8d7a55de1ee81f7ec60be664f957a2bd42b980 Mon Sep 17 00:00:00 2001 From: Isaac Virshup Date: Tue, 12 Feb 2019 04:01:37 +1100 Subject: [PATCH] Set API path based on access address (#568) * Make api paths relative * Remove request import * Set publicPath to be relative --- client/configuration/webpack/webpack.config.prod.js | 2 +- client/index_template.html | 2 +- server/app/web/templates/swagger.html | 2 +- server/app/web/webapp.py | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/client/configuration/webpack/webpack.config.prod.js b/client/configuration/webpack/webpack.config.prod.js index 6cffc8b4..6620962c 100644 --- a/client/configuration/webpack/webpack.config.prod.js +++ b/client/configuration/webpack/webpack.config.prod.js @@ -10,7 +10,7 @@ const nodeModules = path.resolve("node_modules"); const babelOptions = require("../babel/babel.prod"); -const publicPath = "/"; +const publicPath = ""; module.exports = { mode: "production", diff --git a/client/index_template.html b/client/index_template.html index eec21352..fb28018f 100644 --- a/client/index_template.html +++ b/client/index_template.html @@ -24,7 +24,7 @@ diff --git a/server/app/web/templates/swagger.html b/server/app/web/templates/swagger.html index 3df0df1b..115c7eb8 100644 --- a/server/app/web/templates/swagger.html +++ b/server/app/web/templates/swagger.html @@ -73,7 +73,7 @@