Fix development nginx setup

- Expose 3000 for hot reload
- Apply conditional for respository base URL
- Include static files for django admin
This commit is contained in:
Dana Lambert 2021-12-01 09:39:45 +13:00
parent 687a256fff
commit a050f0083e
3 changed files with 8 additions and 1 deletions

View file

@ -2,7 +2,7 @@ import axios from "axios"
// Create the axios object
const repo = axios.create({
baseURL: "/api",
baseURL: window.location.hostname == 'localhost' ? "http://localhost:9000/api" : "/api",
});
repo.defaults.headers.post["access-control-allow-origin"] = "*";