Skip to content

Commit

Permalink
fix: fix middleware regex and ingress route
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisDuarte1 committed Aug 28, 2024
1 parent 5d0cc07 commit dc1790c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 0 additions & 6 deletions services/pulumi/niployments/Pulumi.prod.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions services/pulumi/niployments/services/tts/production/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ new crds.traefik.v1alpha1.IngressRoute(
kind: "Rule",
match: `Host(\`ni.fe.up.pt\`) && PathPrefix(\`/tts\`)`,
middlewares: [redirectToPrimaryAddress],
services: [{
kind: "TraefikService",
name: "noop@internal"
}]
},
],
tls: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const redirectToPrimaryAddressMiddleware = new crds.traefik.v1alpha1.Middleware(
},
spec: {
redirectRegex: {
regex: "^https://ni.fe.up.pt/tts/(.*)",
regex: "^https://ni.fe.up.pt/tts/?(.*)",
replacement: "https://tts.niaefeup.pt/$1",
permanent: false,
},
Expand Down

0 comments on commit dc1790c

Please sign in to comment.