Skip to content

Commit

Permalink
feat(gateway): Redirect to api docs on GET /
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr committed Oct 4, 2024
1 parent 80984b6 commit 5ee3e7a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion gateway/traefik.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,16 @@ http:
middlewares:
- agents-api-strip-prefix-api
service: service-agents-api
priority: 2
priority: 2

agents-api-redirect-to-docs:
entryPoints:
- web
rule: Path(`/`)
middlewares:
- agents-api-redirect-to-docs
service: service-agents-api
priority: 3

middlewares:
corsHeaders:
Expand All @@ -46,6 +55,11 @@ http:
accessControlAllowOriginList: "*"
addVaryHeader: true

agents-api-redirect-to-docs:
redirectRegex:
regex: "^(.*)$"
replacement: "/api/docs"

agents-api-add-headers:
headers:
customrequestheaders:
Expand Down

0 comments on commit 5ee3e7a

Please sign in to comment.