Souin 1.6.36 + Traefik 3.0 beta 2
kraoc opened this issue · comments
I got this
Souin; fwd=uri-miss; detail=UNSUPPORTED-METHOD
on
With:
trafik.yml
experimental:
plugins:
souin:
moduleName: github.com/darkweak/souin
version: v1.6.36
config.yml
http-cache:
plugin:
souin:
api:
prometheus: {}
souin: {}
default_cache:
ttl: 5s
allowed_http_verbs:
- GET
- HEAD
- POST
default_cache_control: no-store
log_level: error
urls:
"infos.zogg.fr":
ttl: 50s
default_cache_control: public, max-age=86400
Despite this no caching (???) I got no other errors...
Can you paste your curl request?
Used Copy as cURL from Firefox:
curl 'https://infos.zogg.fr/' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' \
-H 'Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'DNT: 1' \
-H 'Alt-Used: infos.zogg.fr' \
-H 'Connection: keep-alive' \
-H 'Cookie: __cf_bm=_73DpJgDLc5Qszxwaolu.0fOLNzFT516szzuPG94v_o-1680228226-0-AUZAPtetyapaOEHjSrCGy3yw3lYlwLJ/H0rZcTF4f+UKg1BzCnYgT8+8oiYXwjF4oP16vLu2tLSVIn0KM3cO8KabjNyP9ass+kMFQ0Eo8ZLaik0HnN2J3qONcdrFW2C/RQ==' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'Sec-Fetch-Dest: document' \
-H 'Sec-Fetch-Mode: navigate' \
-H 'Sec-Fetch-Site: none' \
-H 'Sec-Fetch-User: ?1' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'TE: trailers'
Using a simple drop into a bash shell, curl --head https://infos.zogg.fr
:
HTTP/2 200
date: Fri, 31 Mar 2023 02:21:07 GMT
content-type: text/html; charset=utf-8
access-control-allow-credentials: true
access-control-allow-headers: *, Authorization
access-control-allow-origin: *
access-control-expose-headers: *, Authorization
age: 92
cache-control: public, max-age=60
cache-status: Souin; fwd=uri-miss; detail=UNSUPPORTED-METHOD
content-security-policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; img-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; font-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; connect-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; frame-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; object-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; media-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; prefetch-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; style-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; child-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; default-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:;
permissions-policy: fullscreen=(*), display-capture=(self), accelerometer=(), battery=(), camera=(), autoplay=(self), vibrate=(self), geolocation=(self), midi=(self), notifications=(*), push=(*), microphone=(self), magnetometer=(self), gyroscope=(self), payment=(self)
referrer-policy: same-origin
sec-fetch-site: cross-site
strict-transport-security: max-age=15552000; includeSubDomains; preload
vary: Accept-Encoding,Origin
x-cache: HIT
x-cache-hits: 1
x-cacheable: YES
x-content-type-options: nosniff
x-forwarded-proto: https
x-frame-options: SAMEORIGIN
x-host: infos.zogg.fr
x-permitted-cross-domain-policies: none
x-powered-by: Express
x-robots-tag: none,noarchive,nosnippet,notranslate,noimageindex
x-url: /
x-varnish: 163916 262211
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=Gq0lX%2FIibnZGmUc2zK6jgj%2F6sMUVEVe2fGGXAMA2YVJHgE3TdW2mT4Ow%2B8%2BzXFBCfsLjKCvLffbytVu5Ei37OC9QOpYUjKkJY8YTN%2F74zNZ4mXlSp%2FJGOHQXL2DWKakou143Wtnrq2WYfJqJ"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 7b051df989d20377-CDG
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
Deactivating Varnish and keep only Souin as cache gives:
curl --head https://infos.zogg.fr
HTTP/2 200
date: Fri, 31 Mar 2023 02:24:47 GMT
content-type: text/html; charset=utf-8
access-control-allow-credentials: true
access-control-allow-headers: *, Authorization
access-control-allow-origin: *
access-control-expose-headers: *, Authorization
cache-control: public, max-age=60
cache-status: Souin; fwd=uri-miss; detail=UNSUPPORTED-METHOD
content-security-policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; img-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; font-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; connect-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; frame-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; object-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; media-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; prefetch-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; style-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; child-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:; default-src 'self' 'unsafe-inline' 'unsafe-eval' blob: data: wss: https:;
permissions-policy: fullscreen=(*), display-capture=(self), accelerometer=(), battery=(), camera=(), autoplay=(self), vibrate=(self), geolocation=(self), midi=(self), notifications=(*), push=(*), microphone=(self), magnetometer=(self), gyroscope=(self), payment=(self)
referrer-policy: same-origin
sec-fetch-site: cross-site
strict-transport-security: max-age=15552000; includeSubDomains; preload
vary: Accept-Encoding,Origin
x-content-type-options: nosniff
x-forwarded-proto: https
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-powered-by: Express
x-robots-tag: none,noarchive,nosnippet,notranslate,noimageindex
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=zobHyZdaag7kYLXPKC6Ep8dri1250wogQy1P%2FitnX8J0BMKpFVs0ObAL0v3MuoxQx5BHMHAQ5SyRXx4P54sMFVS1JZB0g37e%2FvAlshxPm8vyv3JkMfZ5R5iFQ8Jrs1ah0FkxZP%2BIw4RYPC4O"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 7b052355dbbf2a1b-CDG
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
Was a regression from Træfik itself. I found a way to patch that on my way but that's dirty.
In Træfik v3.0+ they interpret
your_keys:
- one
- two
- three
#and also
your_keys: [one, two, three]
as a string ║24║one║two║three
. TBH I'm fed up about their regressions without any notices and have to check on our side their yaml unmarshall that differs from the common/basic yaml unmarshaller.
v3 is still in beta... si maybe we shall need to wait for a final release... I was maybe to hurried :p
Waiting for the traffic plugin indexation but everything should work now
It's now available! 🚀
Hurry debugging :)
cache-status | Souin; fwd=uri-miss; stored; key=GET-https-infos.zogg.fr-/
It works! Thanks !!!