weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
1.97k stars 193 forks source link

Verbose mode #289

Closed Maxou44 closed 3 years ago

Maxou44 commented 3 years ago

Hello :)

Thanks for your amazing project, it's awesome :)

We tried to selfhost the project in a Kubernetes cluster, it works but we randomly have the error: { status: "error", code: 404, message: "The hostname of the origin is unresolvable (DNS) or blocked by policy." }

If we refresh the link url in a new target, after one or two refreshs it works

The docker don't log anything, I don't know what to do to debug it, how can I have verbose errors/logs ?

Have a great day, Maxime

kleisauke commented 3 years ago

Sounds like the IPv6 interface is not properly configured, see #206 for more information. If using Docker, you can try to switch to host networking by passing --network host to the command line.

If that doesn't work, you could enable debugging in the nginx module by commenting this out. https://github.com/weserv/images/blob/dffb6b496bb8c62e306ff5b5698d651265f711af/third_party/nginx/CMakeLists.txt#L8 (I can't recommend turning that on in production because these debug logs are quite verbose)

This also allows you to pass &debug=1, &debug=2, etc. within the URL. https://github.com/weserv/images/blob/c071d29998461d5a1d5d249699c20f23c6dabe62/src/nginx/module.h#L126-L133

Maxou44 commented 3 years ago

Thanks for the answer, it solved my issue 🥰