Closed DunklerPhoenix closed 1 year ago
My thoughts: maybe there is some webserver rule that tries to cache static assets like PNG files?
In that case I should probably rename the route and use a different file extension.
Can you change this line from
#[Route(path: '/{username}/totp.png', name: 'user_profile_2fa_image', methods: ['GET'])]
to
#[Route(path: '/{username}/totp', name: 'user_profile_2fa_image', methods: ['GET'])]
then reload the Kimai cache (maybe even restart PHP-FPM to clear the bytecode cache) and try to open the URL afterwards @DunklerPhoenix ?
Maybe we can find out if it depends on the filename or if something else is wrong.
Sorry for the late answer. Yes this works
The funny thing is also: before the change of that line I get under '/{username}/totp.png' an nginx 404 error, but under every other address like '/{username}/totp' an kimai 404 error. So it really seems that this nginx image has a problem with the .png ending here.
I assume this rule is conflicting @tobybatch : https://github.com/tobybatch/nginx-fpm-reverse-proxy/blob/main/nginx_default.conf#L9
Can you change it in a way, that only existing directories under /public/ are cached ?
TBH I don't know, I'll l;eave this open and look when I get time.
I could create a fixed path prefix, where all "on-the-fly generated" assets are hosted at if that is simpler.
So instead of /{username}/totp.png
it would be /dynamic/{username}/totp.png
and the cache rule only needs to skip everything below /dynamic/
directory.
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.
Describe the bug Heho I opened this issue here https://github.com/kimai/kimai/issues/3983 The TOTP QR Code for the user is missing. @kevinpapst tested it in the Demo system and the QR Code works. So the only possible point where the problem comes from should be this container.
To Reproduce Steps to reproduce the behaviour:
Desktop (please complete the following information):
Docker compose file (with passwords redacted)
Additional context