Skip to content
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

calibre-web deletes auth cookie #3270

Open
aguaviva opened this issue Jan 1, 2025 · 5 comments
Open

calibre-web deletes auth cookie #3270

aguaviva opened this issue Jan 1, 2025 · 5 comments
Labels

Comments

@aguaviva
Copy link

aguaviva commented Jan 1, 2025

Describe the bug/problem

Is somehow Calibre-web deleting cookies or doing some sort of cookie management? Only when using Calibre-web my auth cookie sometimes disappears.

Request
I'd appreciate some hints on where to look. Does it ring a bell of what could be causing this?

Context
note: I am using Calibre-web though a NGINX proxy + auth cookie, and this set up is working with many other self hosted apps.

Thanks.

@OzzieIsaacs
Copy link
Collaborator

Calibre-web uses the cookie name session, to store the login information, if other services on the same server use the same name, this could indeed lead to a behavior like the described.
The formerly undocumented environment variable COOKIE_PREFIX can help in this case.
If you set it to something like "cw", the session is stored in a cookie "cw_session" afterwards and should no longer interfere with other services.
To check the cookie names of the other services you could open the developer console of your browser and check the requests, there should be a tab showing the cookie names, if they are the same calibre-web uses, they will get overwritten, and the other service itself will overwrite the cookie of calibre-web

@aguaviva
Copy link
Author

aguaviva commented Jan 2, 2025

Thank you for taking the time to write this detailed answer, I'll give it a try and debug the issue as much as I can.

@aguaviva
Copy link
Author

aguaviva commented Jan 5, 2025

I am still debugging the issue. Quick question, it looks like when I run calibre-web over a nginx proxy I get all these cookies (see below)... I believe it might be related as this doesn't happen when I access is directly., Any idea why are those cookies there?

image

/libros is the path where I put calibre-web

@OzzieIsaacs
Copy link
Collaborator

Normally the cookie should be stored in association with the /libros path, the cover/number paths are all related to simple calls for showing a cover, they should not store a cookie, I have no idea why this happens for you

@OzzieIsaacs
Copy link
Collaborator

I‘m using Apache as proxy and I don‘t get this cookies. My feeling is, this is a missconfiguration on your side, have you check the wiki regarding examples for setting up the proxy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants