fix(consumer): Use relative API URLs for findadispo/findagram
The consumer frontends were hardcoded to use cannaiq.co as the API URL, but each domain has its own /api path in the ingress that routes to the shared backend. Using relative URLs allows each site to make API calls to its own domain. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,9 +12,9 @@ RUN npm install
|
||||
# Copy source files
|
||||
COPY . .
|
||||
|
||||
# Set build-time environment variable for API URL (CRA uses REACT_APP_ prefix)
|
||||
# All consumer sites use cannaiq.co/api as the backend
|
||||
ENV REACT_APP_API_URL=https://cannaiq.co
|
||||
# Note: REACT_APP_API_URL is intentionally NOT set here
|
||||
# The frontend uses relative URLs (same domain) in production
|
||||
# API calls go to /api/* which the ingress routes to the backend
|
||||
|
||||
# Build the app (CRA produces /build, not /dist)
|
||||
RUN npm run build
|
||||
|
||||
@@ -12,9 +12,9 @@ RUN npm install
|
||||
# Copy source files
|
||||
COPY . .
|
||||
|
||||
# Set build-time environment variable for API URL (CRA uses REACT_APP_ prefix)
|
||||
# All consumer sites use cannaiq.co/api as the backend
|
||||
ENV REACT_APP_API_URL=https://cannaiq.co
|
||||
# Note: REACT_APP_API_URL is intentionally NOT set here
|
||||
# The frontend uses relative URLs (same domain) in production
|
||||
# API calls go to /api/* which the ingress routes to the backend
|
||||
|
||||
# Build the app (CRA produces /build, not /dist)
|
||||
RUN npm run build
|
||||
|
||||
Reference in New Issue
Block a user