Skip to content

frontend: Return 401 for sign in page if redirecting

Warren Gifford requested to merge redirect-401 into master

Created by: keegancsmith

If we are being redirected to another page after sign in, it means the user attempted to access something without authorization. Reflect this in the status code. This is useful when users curl / code which interacts with the Sourcegraph endpoints. Specifically this is a common issue facing extension developers interacting with the raw API.

Fixes https://github.com/sourcegraph/sourcegraph/issues/1248

Merge request reports

Loading