-
Notifications
You must be signed in to change notification settings - Fork 118
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
Login no longer works for non root databases #215
Comments
Databases can be proxied (nginx, express-pouch, ...) and be hosted in a sub-path of a domain. This was not taken in account during the refactoring to use url-parse (commit 7472135). Fixes pouchdb-community#215
Databases can be proxied (nginx, express-pouch, ...) and be hosted in a sub-path of a domain. This was not taken in account during the refactoring to use url-parse (commit 7472135). Fixes pouchdb-community#215
Hi @Brimstedt. Thank you very much for bug report. Would you mind looking at the new test case and corresponding fix in #216 ? Note that the Please test it and tell me if that fits your requirements. |
Hi, thanks for the quick fix. Unfortunately, I just get loads of errors when running the test suite, so I cannot verify tests. Code changes looks good though! |
Expected Behavior
I expect to be able to login even if I have my database in a sub path on server:
https://xxx.yyy.com/db/dbname
In an older version, this was no problem
Current Behavior
After upgrading to the latest version of the pouchdb-authentication plugin, Im unable to login if I have couchdb proxied on a sub path.
Possible Solution
I think this is the breaking commit:
7472135
If I test the previously used regex, it would extract the url as
https://xxx.yyy.com/db
following my sample above. New method used (origin) returns only scheme + domain + portReverting those lines to using regex makes things work again.
Steps to Reproduce (for bugs)
Context
Unable to login users
Your Environment
The text was updated successfully, but these errors were encountered: