Comments (10)
Great!
The app must be adding the slash back in before making a connection attempt
Yep exactly, the app adds /api/[whatever]
, making the invalid request look like https://abc.example.org/scan//api/[whatever]
Line 222 in a72fc4e
from paperless_app.
Thank you for the detailed report!
I'm on mobile now, but I think this has to do with the validation that determines which paperless server to use.
Line 230 in a72fc4e
I'll help with this once I'm back at the desk.
from paperless_app.
Could you share your reverse proxy directive?
from paperless_app.
Sure thing. The relevant part of the Caddyfile is as follows:
abc.example.org {
reverse_proxy /* someotherphotohostingservice:2342
reverse_proxy /scan/* paperless_webserver_1:8000
reverse_proxy /rss/* http://rssaggregator-docker_web-nginx_1
}
This configuration makes Caddy automatically get an SSL certificate from Let's Encrypt for the domain (which is not actually abc.example.org, of course). It's using the DNS challenge for this, since my server isn't addressable from outside the LAN (except via VPN).
The other thing to note is that the paperless-ng postgres database is running on a nonstandard port (I was getting weird authentication errors when it was running on the same port as the postgres container for my self-hosted RSS aggregator. At some point I might make them use the same postgres instance, but for now they're distinct containers on distinct ports.
So my docker-compose.env is:
PAPERLESS_FORCE_SCRIPT_NAME=/scan PAPERLESS_DBPORT=5430
And the relevant part of my docker-compose.yml is:
environment: POSTGRES_DB: paperless POSTGRES_USER: paperlessuser POSTGRES_PASSWORD: paperlesspassword command: -p 5430
from paperless_app.
That's excellent, thanks. I was trying all kinds of url rewrite
and header
tricks when PAPERLESS_FORCE_SCRIPT_NAME=/scan
is what I needed to get it working.
I'm seeing the same error you are when there's a trailing slash in the URL field.
https://abc.example.org/scan/
fails whilehttps://abc.example.org/scan
logs in correctly
This is a bug in how baseURL
is handled, I'll create a PR later to fix this so either variation of the above should work.
When you get a min, could you confirm if dropping the trailing slash works for you?
EDIT: I knew this sounded familiar...
from paperless_app.
Dropping the slash works perfectly. The app must be adding the slash back in before making a connection attempt, because /scan is not a valid paperless-ng address on my server - it gets handled under my reverse proxy's /* redirect rule.
from paperless_app.
I can understand why it would do so, because the Paperless-NG documentation instructs you to leave out the trailing slash when hosting at a subpath ("To host paperless under a subpath url like example.com/paperless you set this value to /paperless. No trailing slash!") . That's what I've done in the paperless-ng config, but my Caddyfile redirect does include the trailing slash (omitting it didn't seem to work). Maybe it should check whether the baseURL includes a trailing slash, and only include one if it's missing?
EDIT: you beat me to it!
from paperless_app.
IIRC an nginx proxy requires the same thing to work also, no big deal :)
This fix will be included in the next release. Thanks for your help!
from paperless_app.
Hi,
I'm still having the same issue.
My server is running at https://paperless.domainname.com
behind a Traefik reverse proxy
from paperless_app.
The app available through app stores hasn't been updated yet, so you have to make sure there's no trailing slash in the server URL configured in the app. Next time the app updates, the underlying issue should be fixed.
from paperless_app.
Related Issues (20)
- [iOS] ADD files from Files.app HOT 1
- IOS App Bug On Initial Connection HOT 6
- support for SECOND frontend http auth login HOT 1
- iOS upload not working HOT 1
- WRONG_VERSION_NUMBER HOT 1
- Wrong language in dates
- App shows wrong "create date"
- other paperless app, merge?
- It used to work but not anymore
- Meaningfull download filename ( config option ? ) instead of Document ID.
- “Error while connecting to server” with -ngx HOT 1
- No login to the server possible HOT 2
- Login not possible anymore HOT 1
- Feature request: support multiple paperless instances
- Add custom header (ie: X-Api-Key) to all requests
- mTLS Client Authentication to reverse proxy
- New Correspondent, Document Type, or Tag just shows Gray Screen when within a document HOT 1
- support backup with Seedvault
- Android 13 (SDK 33) not supported
- Editing documents with paperless-ngx 2.0 fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paperless_app.