Skip to content
Permalink
Browse files

Align Traefik Frontend Rules with PREvant's Request

While PREvant resolves .well-known/host-meta.json with Forwarded and
X-Forwarded-Prefix headers the actual requests to the service through
Traefik did not. Therefore, PREvant labels the containers with PathPrefixStrip
which include the X-Forwarded-Prefix header. Then, services are able to
generate correct links.
  • Loading branch information...
schrieveslaach committed Sep 8, 2019
1 parent b7e54bf commit 72f3b5d1bf95f430b7b7b27efd4adc3b2762e983
Showing with 1 addition and 1 deletion.
  1. +1 −1 api/src/infrastructure/docker.rs
@@ -240,7 +240,7 @@ impl DockerInfrastructure {
// PathPrefixStrip so that the request to the service contains the X-Forwarded-Prefix header
// which can be used by the service to generate dynamic links.
let traefik_frontend = format!(
"ReplacePathRegex: ^/{app_name}/{service_name}/(.*) /$1;PathPrefix:/{app_name}/{service_name}/;",
"PathPrefixStrip: /{app_name}/{service_name}/;",
app_name = app_name,
service_name = service_config.service_name()
);

0 comments on commit 72f3b5d

Please sign in to comment.
You can’t perform that action at this time.