Git Product home page Git Product logo

Comments (7)

CHBMB avatar CHBMB commented on July 20, 2024 1

No idea matey, never laid a hand on Traefik. But at least it gives some direction. I can't really help unfortunately as it's not an issue I can sort out from the docker image side.

If you do figure it out, would you mind posting a solution so any other Traefik users can see.

Hopefully someone might happen across this issue and lend a hand.

from docker-calibre-web.

zkhcohen avatar zkhcohen commented on July 20, 2024

Oddly enough, roughly 1:3 times I click on Advanced Search, I also get booted back to the login page... although after adding a new user, it seems to have stabilized. The PDF download issue was not fixed.

I have completely rebuilt the container, deleting all persistent data, and the issue persists.

from docker-calibre-web.

CHBMB avatar CHBMB commented on July 20, 2024

I can't reproduce this, I don't use pdfs in my library but just added one and downloaded it multiple times uneventfully.

Is your calibre-web behind a reverse proxy (mine is using nginx), I'm guessing you are as there's no mapped ports in your docker-compose and fwiw I'm using a local folder for my /books mount, rather than a CIFS mount, so I think it's probably one of those causing the issue.

Can you try accessing calibre-web from http://$HOST_IP-ADDRESS:$MAPPED_HOST_PORT

from docker-calibre-web.

CHBMB avatar CHBMB commented on July 20, 2024

My gut feeling is it's the CIFS mount tbh

from docker-calibre-web.

zkhcohen avatar zkhcohen commented on July 20, 2024

Is your calibre-web behind a reverse proxy (mine is using nginx), I'm guessing you are as there's no mapped ports in your docker-compose

Great guess -- I use Traefik.

Can you try accessing calibre-web from http://$HOST_IP-ADDRESS:$MAPPED_HOST_PORT

...annd it worked.

What in the world is different about PDF downloads specifically (and using a reverse proxy) that would cause this to occur?

EDIT:

Docker/Traefik config:

labels:
- "traefik.enable=true"
- "traefik.http.routers.calibre-secure.entrypoints=websecure"
- "traefik.http.routers.calibre-secure.rule=Host(<URL>)"
- "traefik.http.routers.calibre-secure.tls=true"
- "traefik.http.routers.calibre-secure.service=calibre"
- "traefik.http.services.calibre.loadbalancer.server.port=8083"
- "traefik.docker.network=containers"

Output from 'docker logs traefik':

2020-06-08T22:28:01.678387774Z time="2020-06-08T22:28:01Z" level=debug msg="vulcand/oxy/roundrobin/rr: completed ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"\",\"Opaque\":\"\",\"User\":null,\"Host\":\"\",\"Path\":\"/login\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"next=%2Fdownload%2F1150%2Fpdf%2F1150.pdf\",\"Fragment\":\"\"},\"Proto\":\"HTTP/1.1\",\"ProtoMajor\":1,\"ProtoMinor\":1,\"Header\":{\"Accept\":[\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\"],\"Accept-Encoding\":[\"gzip\"],\"Accept-Language\":[\"en-US,en;q=0.9,en-GB;q=0.8\"],\"Cdn-Loop\":[\"cloudflare\"],\"Cf-Connecting-Ip\":[\"<MY_WAN_IP>\"],\"Cf-Ipcountry\":[\"US\"],\"Cf-Ray\":[\"<removed>-PDX\"],\"Cf-Request-Id\":[\"<removed>\"],\"Cf-Visitor\":[\"{\\\"scheme\\\":\\\"https\\\"}\"],\"Connection\":[\"Keep-Alive\"],\"Cookie\":[\"__cfduid=<removed>; session=<removed>\"],\"Dnt\":[\"1\"],\"Sec-Fetch-Dest\":[\"document\"],\"Sec-Fetch-Mode\":[\"navigate\"],\"Sec-Fetch-Site\":[\"cross-site\"],\"Sec-Fetch-User\":[\"?1\"],\"Upgrade-Insecure-Requests\":[\"1\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36\"],\"X-Forwarded-Host\":[\"<CALIBRE_URL_FRONTEND>\"],\"X-Forwarded-Port\":[\"443\"],\"X-Forwarded-Proto\":[\"https\"],\"X-Forwarded-Server\":[\"a3fd680b73c8\"],\"X-Real-Ip\":[\"<MY_CLIENT_IP>\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"<CALIBRE_URL_FRONTEND>\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"<MY_CLIENT_IP>:41478\",\"RequestURI\":\"/login?next=%2Fdownload%2F1150%2Fpdf%2F1150.pdf\",\"TLS\":null}"

from docker-calibre-web.

zkhcohen avatar zkhcohen commented on July 20, 2024

Session security was hardened on calibre-web on May 9th, which appears to be causing the problem:

janeczku/calibre-web#1466 (comment)

I'm going to try this fix ASAP and report back before closing the issue.


Confirmed that the above fix does work. The docker build will need to be re-run after the owner produces a permanent fix for the issue in an upcoming release.

from docker-calibre-web.

CHBMB avatar CHBMB commented on July 20, 2024

@zkhcohen Our image automatically rebuilds on any new releases and weekly to update any other packages in the image.

from docker-calibre-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.