Skip to content

fix: request stackoverflow.com without www for shortened links - #205

Open
vlnst wants to merge 1 commit into
httpjamesm:mainfrom
vlnst:fix-short-links
Open

vlnst wants to merge 1 commit into
httpjamesm:mainfrom
vlnst:fix-short-links

Conversation

@vlnst

@vlnst vlnst commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #177

Shortened links like stackoverflow.com/a/<id>/<userid> are redirected to a malformed URL.

RedirectShortenedOverflowURL requests www.stackoverflow.com, which answers with a 302 to the absolute URL https://stackoverflow.com/a/<id>/<userid>. The handler appends that Location to APP_URL as if it were a path.

Requesting stackoverflow.com directly returns the relative /questions/... location the handler expects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shorten SO links do not work

1 participant