Skip to content

Commit 81bb46d

Browse files
committed
Always allow OPTIONS request regardless of token validity
1 parent 44f1b1e commit 81bb46d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rpthandler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func New(ctx context.Context, next http.Handler, config *Config, name string) (h
5757
func (a *RptHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
5858
var currentAuthHeader = req.Header.Get("Authorization")
5959

60-
if currentAuthHeader == "" {
60+
if currentAuthHeader == "" || req.Method == "OPTIONS" {
6161
a.next.ServeHTTP(rw, req)
6262
return
6363
}

0 commit comments

Comments
 (0)