From 81aacedfdd3c9d6f59ea32a560ccd4eae519fdda Mon Sep 17 00:00:00 2001 From: Sean T Canavan Date: Mon, 17 Jul 2023 16:37:19 -0500 Subject: [PATCH] fix http parser Signed-off-by: Sean T Canavan --- lambda_router/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lambda_router/http.go b/lambda_router/http.go index 0dc6da2..7671772 100644 --- a/lambda_router/http.go +++ b/lambda_router/http.go @@ -39,11 +39,11 @@ func (l *Router) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set(CORSHeadersHeaderKey, corsHeaders) } - if corsMethods == "" { + if corsMethods != "" { w.Header().Set(CORSMethodsHeaderKey, corsMethods) } - if corsOrigins == "" { + if corsOrigins != "" { w.Header().Set(CORSOriginHeaderKey, corsOrigins) }