-
-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of x-forwarder-for and metadata in "New subscriber" logs #546
Comments
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 Regarding logging JWT |
How should i use it in Caddy? I've read something about the |
) * feat(hub): add metadata to new subscriber log Ref: #546 * feat(hub): display payload in new subscriber log only in debug mode * test(hub): add a test with debug mode... ... to ensure payload is properly logged * test(hub): make sure payload is present in debug mode only * style(hub): fix golangci issues - use gofumpt instead of go fmt - declare testSubscribeLogs as an helper * test: update tests to chez payload content * style: add a blank line before return * test(hub): debug subscription test * test: unmarshal some json to mimic jwt payload content * fix(hub): add payload if log level is debug * test(hub): use assert.Equal instead of assert.True * test: try again with a structure * Revert "test: try again with a structure" This reverts commit e4b283f. * test: get rid of json.Unmarshal by declaring the resulting structure directly * minor cleanup --------- Co-authored-by: Kévin Dunglas <[email protected]>
Just hit this as well. @dunglas I believe the issue here is that the I have configured the following for the global mercure options:
This will log the actual
I am however not seeing the I tried setting the Line 253 in 0e9cc02
This means that the legacy server did have the logic we need for correct proxy header handling, as that update the So, the actual question here is: can we get the option and handler implementation back? |
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 #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.
The text was updated successfully, but these errors were encountered: