Fix preflight response status in access logs
Co-authored-by: lbenguigui <lbenguigui@gmail.com>
This commit is contained in:
parent
ab7993428d
commit
e95fde5652
4 changed files with 60 additions and 0 deletions
|
@ -53,6 +53,7 @@ func NewHeader(next http.Handler, cfg dynamic.Headers) (*Header, error) {
|
|||
func (s *Header) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
||||
// Handle Cors headers and preflight if configured.
|
||||
if isPreflight := s.processCorsHeaders(rw, req); isPreflight {
|
||||
rw.WriteHeader(http.StatusOK)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue