fix: Use settings.BASE_URL for OAuth discovery endpoint URLs#244
Merged
Conversation
lisad
approved these changes
Feb 10, 2026
Base automatically changed from
LOLA/updating-rfc8414-discovery-endpoint
to
main
March 30, 2026 21:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on PR #242
The RFC8414 OAuth Authorization Server Metadata endpoint (
/.well-known/oauth-authorization-server) was returning HTTP URLs in production instead of HTTPS, breaking LOLA account portability:{ "issuer": "http://ap-testbed.dtinit.org", // Should be https:// "authorization_endpoint": "http://ap-testbed.dtinit.org/oauth/authorize/", "token_endpoint": "http://ap-testbed.dtinit.org/oauth/token/" }Custom domain mapping on Cloud Run creates a load balancer that terminates SSL but doesn't forward the
X-Forwarded-Proto: httpsheader correctly. Django'srequest.schemereturns'http'even though clients connect via HTTPS.Staging works correctly (uses Cloud Run's
.run.appdomain with no load balancer), while production fails (uses custom domainap-testbed.dtinit.orgwith load balancer).This is a patch that unblocks the LOLA federation while I continue to investigate the infrastructure issue.
I updated
oauth_authorization_server_metadata()ontestbed/core/views.pysettingsfromdjango.confBASE_URLin settingstestbed/settings/base.py-BASE_URL = "http://localhost:8000"(development)testbed/settings/production.py-BASE_URL = "https://ap-testbed.dtinit.org"(production)testbed/settings/staging.py-BASE_URL = "https://activitypub-testbed-stg-run-...(staging)Production
Closes #243