Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRedirect ¶
CheckRedirect provides a custom redirect policy that is more conservative/ strict than the default.
Normally Go follows redirects similarly to how a browser would, but that means sometimes changing the method (e.g. POST -> GET), dropping the body, or removing auth-related headers.
The goal of this function is to ensure we only execute redirects that would be materially equivalent to the original request.
Go's internal behavior is already set up to protect auth data, including cookies, by ensuring they can only be sent to the original host (or subdomains). If Go has seen fit to remove the auth data, we will consider the new request to be materially different, and stop following redirects.
Types ¶
This section is empty.