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 ead0d6756e
commit 40a6348e7c
3 changed files with 25 additions and 11 deletions

View File

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

View File

@ -13,7 +13,7 @@ static_resources:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
stat_prefix: ingress
codec_type: auto
route_config:
name: local_route
@ -21,14 +21,27 @@ static_resources:
- name: local_services
domains: ["*"]
routes:
- match: { prefix: "/app" }
route: { cluster: app-service }
- match: { prefix: "/obj" }
route: { cluster: minio-service }
- match: { prefix: "/worker" }
route: { cluster: worker-service }
- match: { prefix: "/db" }
route: { cluster: couchdb-service }
- match: { prefix: "/app/" }
route:
cluster: app-service
prefix_rewrite: "/"
- match: { prefix: "/worker/" }
route:
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:
- name: envoy.filters.http.router

View File

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