Skip to content

Commit 109136a

Browse files
authored
Fixed comment to mention the correct HTTP status code used (#98)
The comment says a 302 will be used but the code actually uses Go core lib `http.StatusTemporaryRedirect` which is 307 (which i think is the right one to use because that instructs clients to re-send the same HTTP method as in the original request)
1 parent 3d539f9 commit 109136a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

secure.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type Options struct {
6565
SSLRedirect bool
6666
// If SSLForceHost is true and SSLHost is set, requests will be forced to use SSLHost even the ones that are already using SSL. Default is false.
6767
SSLForceHost bool
68-
// If SSLTemporaryRedirect is true, the a 302 will be used while redirecting. Default is false (301).
68+
// If SSLTemporaryRedirect is true, then a 307 will be used while redirecting. Default is false (301).
6969
SSLTemporaryRedirect bool
7070
// If STSIncludeSubdomains is set to true, the `includeSubdomains` will be appended to the Strict-Transport-Security header. Default is false.
7171
STSIncludeSubdomains bool

0 commit comments

Comments
 (0)