Open si14 opened 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I think the bot was too eager to close it :(
Hi @si14,
Regarding X-Forwarded-For
, I think that this should be handled at Caddy's level. It's probably already to do this kind of rewrite (but I'm not sure if it's a good idea).
Regarding logging JWT payload
, indeed it's a good idea, especially now that Caddy will allow to easily filter and redact log fields. Do you want to try to open a PR?
How should i use it in Caddy? I've read something about the reverse_proxy
directive that has a trusted_proxies
option but i can't figure out how to use that in the mercure directive. What should i use for Caddy?
First of all, thanks for this awesome piece of software!
We've deployed the latest Mercure and it works great. However, there are two tiny ops snags in its logging as you can see on the screenshot:
Firstly, it uses IP of our LB, not the one from
X-Forwarder-For
. There is a very old issue about this that eventually got fixed https://github.com/dunglas/mercure/issues/114 , but I guess the fix was lost during the big rewrite.Secondly, do you think it's possible to log JWT
payload
if it's present? According to the spec, we can grab it by subscribing to the subscription topic, but that would require a separate service just to log those payloads. "New subscriber" log entries are already there, so ifpayload
can be logged as well it would be perfect.Hopefully I don't miss anything from the docs that makes those points moot.