errorJSON returns the error code with an application/json mime type
(rw http.ResponseWriter, code int)
| 1337 | |
| 1338 | // errorJSON returns the error code with an application/json mime type |
| 1339 | func (p *OAuthProxy) errorJSON(rw http.ResponseWriter, code int) { |
| 1340 | rw.Header().Set("Content-Type", applicationJSON) |
| 1341 | rw.WriteHeader(code) |
| 1342 | // we need to send some JSON response because we set the Content-Type to |
| 1343 | // application/json |
| 1344 | rw.Write([]byte("{}")) |
| 1345 | } |
| 1346 | |
| 1347 | // LoggingCSRFCookiesInOAuthCallback Log all CSRF cookies found in HTTP request OAuth callback, |
| 1348 | // which were successfully parsed |
no test coverage detected