mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
911d71204f
This changes the way XML HTTP requests are handled on the verify endpoint so that they are redirected using a 401 instead of a 302/303.
32 lines
858 B
Go
32 lines
858 B
Go
package middlewares
|
|
|
|
const jwtIssuer = "Authelia"
|
|
|
|
const (
|
|
headerXForwardedProto = "X-Forwarded-Proto"
|
|
headerXForwardedMethod = "X-Forwarded-Method"
|
|
headerXForwardedHost = "X-Forwarded-Host"
|
|
headerXForwardedURI = "X-Forwarded-URI"
|
|
headerXOriginalURL = "X-Original-URL"
|
|
headerXRequestedWith = "X-Requested-With"
|
|
)
|
|
|
|
const (
|
|
headerValueXRequestedWithXHR = "XMLHttpRequest"
|
|
)
|
|
|
|
const (
|
|
contentTypeApplicationJSON = "application/json"
|
|
contentTypeTextHTML = "text/html"
|
|
)
|
|
|
|
var okMessageBytes = []byte("{\"status\":\"OK\"}")
|
|
|
|
const (
|
|
messageOperationFailed = "Operation failed"
|
|
messageIdentityVerificationTokenAlreadyUsed = "The identity verification token has already been used"
|
|
messageIdentityVerificationTokenHasExpired = "The identity verification token has expired"
|
|
)
|
|
|
|
var protoHostSeparator = []byte("://")
|