Version working with reverse proxy, need to just change settings menu in builder now to use this properly.

This commit is contained in:
mike12345567 2021-01-05 18:47:51 +00:00
parent d36c2f3102
commit 49f56ebd53
3 changed files with 25 additions and 11 deletions

View File

@ -42,7 +42,7 @@ services:
volumes: volumes:
- data1:/data - data1:/data
ports: ports:
- "9000:9000" - "${MINIO_PORT}:9000"
environment: environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY} MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY} MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}

View File

@ -13,7 +13,7 @@ static_resources:
- name: envoy.filters.network.http_connection_manager - name: envoy.filters.network.http_connection_manager
typed_config: typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http stat_prefix: ingress
codec_type: auto codec_type: auto
route_config: route_config:
name: local_route name: local_route
@ -21,14 +21,27 @@ static_resources:
- name: local_services - name: local_services
domains: ["*"] domains: ["*"]
routes: routes:
- match: { prefix: "/app" } - match: { prefix: "/app/" }
route: { cluster: app-service } route:
- match: { prefix: "/obj" } cluster: app-service
route: { cluster: minio-service } prefix_rewrite: "/"
- match: { prefix: "/worker" }
route: { cluster: worker-service } - match: { prefix: "/worker/" }
- match: { prefix: "/db" } route:
route: { cluster: couchdb-service } cluster: worker-service
prefix_rewrite: "/"
- match: { prefix: "/db/" }
route:
prefix_rewrite: "/"
cluster: couchdb-service
# minio is on the default route because this works
# best, minio + AWS SDK doesn't handle path proxy
- match: { prefix: "/" }
route:
cluster: minio-service
http_filters: http_filters:
- name: envoy.filters.http.router - name: envoy.filters.http.router

View File

@ -9,7 +9,8 @@ let cache = {}
* Makes a fully formatted URL based on the SDK configuration. * Makes a fully formatted URL based on the SDK configuration.
*/ */
const makeFullURL = path => { const makeFullURL = path => {
return `/${path}`.replace("//", "/") const isProxy = window.location.pathname.startsWith("/app/")
return `${isProxy ? "/app/" : "/"}${path}`.replace("//", "/")
} }
/** /**