Trying to fix 403 on many requests #143
This commit is contained in:
3 files changed
+7
-10
No files matched your search
@@ -96,12 +96,12 @@ func (e extractor) ExtractToken(r *http.Request) (string, error) {
|
||||
return token, nil
|
||||
}
|
||||
|
||||
token, _ = request.ArgumentExtractor{"token"}.ExtractToken(r)
|
||||
if token != "" {
|
||||
return token, nil
|
||||
cookie, err := r.Cookie("auth")
|
||||
if err != nil {
|
||||
return "", request.ErrNoTokenInRequest
|
||||
}
|
||||
|
||||
return "", request.ErrNoTokenInRequest
|
||||
return cookie.Value, nil
|
||||
}
|
||||
|
||||
// validateAuth is used to validate the authentication and returns the
|
||||
|
||||
Reference in new issue
Block a user