Fix dev nginx
This commit is contained in:
@@ -70,9 +70,9 @@ services:
|
||||
nginx:
|
||||
image: nginx
|
||||
environment:
|
||||
- API_URL=http://back:3000
|
||||
- SCOROMETER_URL=http://scorometer:6543
|
||||
- FRONT_URL=http://front:19006
|
||||
- API_URL=${API_URL:-http://back:3000}
|
||||
- SCOROMETER_URL=${SCOROMETER_URL:-http://scorometer:6543}
|
||||
- FRONT_URL=${FRONT_URL:-http://front:19006}
|
||||
- PORT=4567
|
||||
depends_on:
|
||||
- back
|
||||
|
||||
@@ -66,9 +66,7 @@ export class ValidationError extends Error {
|
||||
|
||||
export default class API {
|
||||
public static readonly baseUrl =
|
||||
process.env.NODE_ENV != 'development' && Platform.OS === 'web'
|
||||
? '/api'
|
||||
: process.env.EXPO_PUBLIC_API_URL!;
|
||||
Platform.OS === 'web' ? '/api' : process.env.EXPO_PUBLIC_API_URL!;
|
||||
public static async fetch(
|
||||
params: FetchParams,
|
||||
handle: Pick<Required<HandleParams>, 'raw'>
|
||||
|
||||
@@ -21,7 +21,8 @@ server {
|
||||
proxy_set_header X-Forwarded-Scheme $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_pass ${SCOROMETER_URL};
|
||||
set $upstream ${SCOROMETER_URL};
|
||||
proxy_pass $upstream;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
Reference in New Issue
Block a user