mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 18:33:19 +02:00
authenticate: handle XHR redirect flow (#387)
- authenticate: add cors preflight check support for sign_in endpoint - internal/httputil: indicate responses that originate from pomerium vs the app - proxy: detect XHR requests and do not redirect on failure. - authenticate: removed default session duration; should be maintained out of band with rpc.
This commit is contained in:
parent
9030bd32cb
commit
00c29f4e77
11 changed files with 128 additions and 35 deletions
|
@ -17,3 +17,10 @@ func HealthCheck(w http.ResponseWriter, r *http.Request) {
|
|||
w.Write([]byte(http.StatusText(http.StatusOK)))
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect wraps the std libs's redirect method indicating that pomerium is
|
||||
// the origin of the response.
|
||||
func Redirect(w http.ResponseWriter, r *http.Request, url string, code int) {
|
||||
w.Header().Set(HeaderPomeriumResponse, "true")
|
||||
http.Redirect(w, r, url, code)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue