Skip to content

Commit

Permalink
Update proxying method to allow hostname specification
Browse files Browse the repository at this point in the history
Previous proxying method did not allow use of HOST to restrict connecting hosts to certain network interfaces, which was a security issue. This method also means different settings can be more easily provided for production and development
  • Loading branch information
josephnobes-stfc committed May 20, 2024
1 parent 0921c59 commit 60ec010
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_ENDPOINT_URL=
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"proxy": "http://192.168.0.172:8888",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
Expand Down
7 changes: 3 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ import Mermaid from "./Mermaid";
const ResetMonitorEndpointButton = WithEndpoint(Button);
const SyncEndpointToggleSwitch = WithEndpoint(ToggleSwitch);
function BabyD() {
const periodicEndpoint = useAdapterEndpoint("detector", "", 1000);
const staticEndpoint = useAdapterEndpoint("detector");
const periodicSlowEndpoint = useAdapterEndpoint("detector", "", 5000);
//const periodicDetectorEndpoint = useAdapterEndpoint("detector", "http://localhost:3000", 200);
const periodicEndpoint = useAdapterEndpoint("detector", process.env.REACT_APP_ENDPOINT_URL, 1000);
const staticEndpoint = useAdapterEndpoint("detector", process.env.REACT_APP_ENDPOINT_URL);
const periodicSlowEndpoint = useAdapterEndpoint("detector", process.env.REACT_APP_ENDPOINT_URL, 5000);

const [loki_connection_ok, set_loki_connection_ok] = useState(true);
const [asic_enabled, set_asic_enabled] = useState(false);
Expand Down

0 comments on commit 60ec010

Please sign in to comment.