From b3c7faa813b37dbbf51cd699bb3722cc8d94a52c Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Tue, 16 Feb 2021 16:41:52 +0100 Subject: [PATCH] clean up --- docker/accounts/nginx.secure.conf | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/docker/accounts/nginx.secure.conf b/docker/accounts/nginx.secure.conf index d8e996ef..4656e91e 100644 --- a/docker/accounts/nginx.secure.conf +++ b/docker/accounts/nginx.secure.conf @@ -7,27 +7,4 @@ server { proxy_redirect http://127.0.0.1/ https://$host/; proxy_pass http://oathkeeper:4455; } - - location /.ory/kratos/public/self-service/login/methods/password { - proxy_redirect http://127.0.0.1/ https://$host/; - proxy_pass http://oathkeeper:4455; - - header_filter_by_lua_block { - if ngx.status >= ngx.HTTP_OK and ngx.status < ngx.HTTP_BAD_REQUEST then - local http = require("socket.http") - local sessionCookie = "" - local responseCookies = {} - for k, cookie in ipairs(ngx.header["set-cookie"]) do - local sessionCookieMatch = string.match(cookie, "(ory_kratos_session=[^;]+);") - if sessionCookieMatch then sessionCookie = sessionCookieMatch end - table.insert(responseCookies, cookie) - end - local ok, status, headers = http.request { url = "http://oathkeeper:4455/user", headers = { Cookie = sessionCookie } } - if headers["set-cookie"] then - table.insert(responseCookies, headers["set-cookie"]) - ngx.header["set-cookie"] = responseCookies - end - end - } - } }