fix(dropbox): fix Invalid redirect_uri error by adding PUBLIC_BASE_URL config and URL-encoding
- Add PUBLIC_BASE_URL optional config to override auto-detected OAuth redirect URIs when behind a reverse proxy that doesn't forward X-Forwarded-Proto headers - Add _build_dropbox_redirect_uri() helper in app/api/dropbox.py - URL-encode redirect_uri in server-side Dropbox authorization URL - Add _get_dropbox_callback_url() helper in app/views/dropbox.py - Pass callback_url to both setup and callback templates - Update templates to use server-provided callback_url instead of window.location.origin - Update settings_service.py to register new setting - Update .env.demo, ConfigurationGuide.md, and DropboxSetup.md documentation - Add tests for new helper functions and global-authorize-url endpoint Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -3,6 +3,7 @@ WORKDIR=/workdir
|
||||
DATABASE_URL=sqlite:///./app/database.db
|
||||
REDIS_URL=redis://redis:6379/0
|
||||
EXTERNAL_HOSTNAME=docuelevate.example.com
|
||||
# PUBLIC_BASE_URL=https://docuelevate.example.com # Full URL with scheme; required when X-Forwarded-Proto is not forwarded by your proxy
|
||||
GOTENBERG_URL=http://gotenberg:3000
|
||||
ALLOW_FILE_DELETE=true # Allow deletion of file records
|
||||
COMPLIANCE_ENABLED=true # Enable compliance templates dashboard (GDPR, HIPAA, SOC 2)
|
||||
|
||||
Reference in New Issue
Block a user