File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -391,9 +391,7 @@ func (c *Cors) handlePreflight(w http.ResponseWriter, r *http.Request) {
391
391
if len (c .maxAge ) > 0 {
392
392
headers ["Access-Control-Max-Age" ] = c .maxAge
393
393
}
394
- if c .Log != nil {
395
- c .logf (" Preflight response headers: %v" , headers )
396
- }
394
+ c .logf (" Preflight response headers: %v" , headers )
397
395
}
398
396
399
397
// handleActualRequest handles simple cross-origin requests, actual request or redirects
@@ -440,9 +438,7 @@ func (c *Cors) handleActualRequest(w http.ResponseWriter, r *http.Request) {
440
438
if c .allowCredentials {
441
439
headers ["Access-Control-Allow-Credentials" ] = headerTrue
442
440
}
443
- if c .Log != nil {
444
- c .logf (" Actual response added headers: %v" , headers )
445
- }
441
+ c .logf (" Actual response added headers: %v" , headers )
446
442
}
447
443
448
444
// convenience method. checks if a logger is set.
You can’t perform that action at this time.
0 commit comments