Skip to content
Snippets Groups Projects
Commit 25fbd583 authored by Imre Toth's avatar Imre Toth
Browse files

ICSHWI-6976: added proxy to the dev settings; externalised server address

parent 2cd2c0a4
No related branches found
No related tags found
2 merge requests!25IOCListView now has tabs to prefilter on all or currentUsers IOCs. The currentUser is hardcoded,!19Local develop
Pipeline #77704 failed
REACT_APP_SERVER_ADDRESS=
REACT_APP_API_BASE_ENDPOINT=/ccce-api
\ No newline at end of file
REACT_APP_SERVER_ADDRESS=http://localhost:8080
REACT_APP_API_BASE_ENDPOINT=/ccce-api
\ No newline at end of file
......@@ -24,3 +24,4 @@ yarn-error.log*
.eslintcache
/package-lock.json
.vscode
......@@ -2,6 +2,7 @@
"name": "ccdb-ui-prototype",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:8080",
"dependencies": {
"@fontsource/roboto": "^4.1.0",
"@material-ui/core": "^4.11.2",
......
......@@ -5,11 +5,11 @@ import { useSnackbar } from 'notistack';
import { useHistory } from 'react-router';
const SERVER = `https://${window.location.hostname}/api`; // current domain
const SERVER = `${process.env.REACT_APP_SERVER_ADDRESS}`; // current domain
const createSwaggerClient = async () => {
const swaggerOptions = {
url: `${SERVER}/ccce-api`,
url: `${SERVER}${process.env.REACT_APP_API_BASE_ENDPOINT}`,
requestInterceptor: (req) => {
// if (user) req.headers["Authorization"] = `Bearer ${user.token}`;
req.headers['Content-Type'] = 'application/json';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment