mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 20:16:37 +00:00
Copy response headers back to client
Headers such as Realm / etc are important for auth proxies, so this change and unit test make sure they get copied back to the client. Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
@ -6,7 +6,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_makeLogger(t *testing.T) {
|
func Test_makeLogger_CopiesResponseHeaders(t *testing.T) {
|
||||||
handler := http.HandlerFunc(makeLogger(http.HandlerFunc(
|
handler := http.HandlerFunc(makeLogger(http.HandlerFunc(
|
||||||
func(w http.ResponseWriter, r *http.Request) {
|
func(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("X-Unit-Test", "true")
|
w.Header().Set("X-Unit-Test", "true")
|
||||||
|
Reference in New Issue
Block a user