fix playmat host and image throttling
This commit is contained in:
@@ -62,6 +62,7 @@ data:
|
||||
}
|
||||
location = /img/api/cards/collection {
|
||||
limit_except POST { deny all; }
|
||||
limit_req zone=scryfall_upstream burst=${IMGCACHE_API_BURST};
|
||||
set $api_upstream api.scryfall.com;
|
||||
proxy_pass https://$api_upstream/cards/collection;
|
||||
proxy_set_header Host $api_upstream;
|
||||
@@ -72,10 +73,12 @@ data:
|
||||
proxy_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
|
||||
proxy_cache scryfall_api;
|
||||
proxy_cache_methods GET HEAD POST;
|
||||
proxy_cache_lock on;
|
||||
proxy_cache_key "$request_method$request_uri$request_body";
|
||||
proxy_cache_valid 200 24h;
|
||||
}
|
||||
location /img/api/ {
|
||||
limit_req zone=scryfall_upstream burst=${IMGCACHE_API_BURST};
|
||||
set $api_upstream api.scryfall.com;
|
||||
proxy_pass https://$api_upstream/;
|
||||
proxy_set_header Host $api_upstream;
|
||||
@@ -87,6 +90,7 @@ data:
|
||||
proxy_redirect https://cards.scryfall.io/ /img/cards/;
|
||||
proxy_redirect https://backs.scryfall.io/ /img/backs/;
|
||||
proxy_cache scryfall_api;
|
||||
proxy_cache_lock on;
|
||||
proxy_cache_key $request_uri;
|
||||
proxy_cache_valid 200 301 302 24h;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,16 @@ metadata:
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: mtg.aleshym.co
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: web
|
||||
port:
|
||||
name: http
|
||||
- host: playmat.aleshym.co
|
||||
http:
|
||||
paths:
|
||||
@@ -21,5 +31,6 @@ spec:
|
||||
name: http
|
||||
tls:
|
||||
- hosts:
|
||||
- mtg.aleshym.co
|
||||
- playmat.aleshym.co
|
||||
secretName: playmat-tls
|
||||
|
||||
@@ -26,7 +26,7 @@ spec:
|
||||
containerPort: 80
|
||||
env:
|
||||
- name: DOMAIN
|
||||
value: playmat.aleshym.co
|
||||
value: mtg.aleshym.co
|
||||
- name: TLS_MODE
|
||||
value: external
|
||||
- name: UPSTREAM_PROXIES
|
||||
@@ -34,9 +34,9 @@ spec:
|
||||
- name: XMAGE_GATEWAY
|
||||
value: off
|
||||
- name: XMAGE_ALLOWED_ORIGINS
|
||||
value: https://playmat.aleshym.co
|
||||
value: https://mtg.aleshym.co,https://playmat.aleshym.co
|
||||
- name: XMAGE_PUBLIC_URL
|
||||
value: https://playmat.aleshym.co
|
||||
value: https://mtg.aleshym.co
|
||||
- name: CADDY_IP
|
||||
value: 127.0.0.1
|
||||
readinessProbe:
|
||||
|
||||
@@ -41,9 +41,9 @@ spec:
|
||||
containerPort: 17173
|
||||
env:
|
||||
- name: XMAGE_ALLOWED_ORIGINS
|
||||
value: https://playmat.aleshym.co
|
||||
value: https://mtg.aleshym.co,https://playmat.aleshym.co
|
||||
- name: XMAGE_PUBLIC_URL
|
||||
value: https://playmat.aleshym.co
|
||||
value: https://mtg.aleshym.co
|
||||
- name: XMAGE_SERVER_NAME
|
||||
value: playmat
|
||||
- name: XMAGE_TRUSTED_PROXIES
|
||||
|
||||
Reference in New Issue
Block a user