Skip to content

Commit e110859

Browse files
committed
Remove sensitive information and use environment variables
1 parent 98af059 commit e110859

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

.gitignore

136 Bytes
Binary file not shown.

frontend/src/api.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import axios from 'axios';
22

3-
// Determine if we're in production by checking the hostname
4-
const isProduction = window.location.hostname === '79.76.48.165';
5-
6-
// Create axios instance with base URL based on environment
7-
const API_BASE_URL = isProduction
8-
? 'http://79.76.48.165:8080'
9-
: 'http://localhost:8080';
3+
// Create axios instance with base URL from environment variable
4+
const API_BASE_URL = process.env.REACT_APP_API_BASE_URL || 'http://localhost:8080';
105

116
const api = axios.create({
127
baseURL: API_BASE_URL,

0 commit comments

Comments
 (0)