Skip to content

Commit

Permalink
made sure that the tileserver has a compression middleware in front o…
Browse files Browse the repository at this point in the history
…f it
  • Loading branch information
CommanderStorm committed Apr 5, 2024
1 parent 1572b01 commit 1314132
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions deployment/k3s/templates/networking/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
port: 8080
middlewares:
- name: stripprefix
- name: compress
- name: cache-2-months
- kind: Rule
match: Host(`{{ $.Values.url }}`) && PathPrefix(`/cdn/`)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: compress
spec:
compress: {}
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ services:
- "traefik.http.routers.navigatum-tileserver.entrypoints=webs"
- "traefik.http.routers.navigatum-tileserver.tls.certresolver=leacme"
- "traefik.http.routers.navigatum-tileserver.rule=Host(`nav.tum.de`) && PathPrefix(`/maps/`)"
- "traefik.http.routers.navigatum-tileserver.middlewares=navigatum-stripprefix@docker"
- "traefik.http.routers.navigatum-tileserver.middlewares=navigatum-stripprefix@docker, navigatum-compress@docker, navigatum-compress@docker, navigatum-cache-2m@docker"
- "traefik.http.middlewares.navigatum-stripprefix.stripprefix.prefixes=/maps"
- "traefik.http.middlewares.navigatum-compress.compress=true"
- "traefik.http.middlewares.navigatum-cache-2m.headers.customrequestheaders.Cache-Control=public, max-age=5184000"
- "traefik.http.services.navigatum-tileserver.loadbalancer.server.port=8080"
networks:
- traefik_traefik
Expand Down

0 comments on commit 1314132

Please sign in to comment.