Skip to content

The request URL with the port, But response the next url without the port #8685

Discussion options

You must be logged in to vote

To debug this you'd need to dig into Django's request.build_absolute_uri() and figure out what's going wrong. Possibly some misconfiguration.

I'd start by trying some debugging like...

print(request.build_absolute_uri("/redirect"))   # Check if build_redirect_uri is including the port or not.
print(request.get_host())  # Show what host:port is being used for the absolute URIs.
print(request.META)  # Show the raw WSGI input to the request, which could help us dig out any misconfiguration issues.

Relevant bits of Django source code...

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rikeitou-0191632
Comment options

Answer selected by tomchristie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #8683 on October 07, 2022 10:23.