Fix issue with localhost refs
This commit is contained in:
1 parent
8d646ecd74
commit
c26f458df7
2 files changed
+3
-6
No files matched your search
+2
-2
@@ -12,8 +12,8 @@ COPY . .
|
|||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 3050
|
EXPOSE 3050
|
||||||
|
|
||||||
# Set environment variable for API URL
|
# Set environment variable for API URL (relative to the frontend host)
|
||||||
ENV VITE_API_URL=http://localhost:3051/api
|
ENV VITE_API_URL=/api
|
||||||
|
|
||||||
# Start development server
|
# Start development server
|
||||||
CMD ["npm", "start"]
|
CMD ["npm", "start"]
|
||||||
@@ -4,10 +4,7 @@ const API_BASE_URL = import.meta.env.VITE_API_URL || '/api';
|
|||||||
|
|
||||||
const api = axios.create({
|
const api = axios.create({
|
||||||
baseURL: API_BASE_URL,
|
baseURL: API_BASE_URL,
|
||||||
timeout: 30000,
|
timeout: 30000
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const getLineOfSight = async (lat, lon, direction, tolerance) => {
|
export const getLineOfSight = async (lat, lon, direction, tolerance) => {
|
||||||
|
|||||||
Reference in new issue
Block a user