check going through oathkeeper

This commit is contained in:
Karol Wypchlo 2021-02-05 17:37:00 +01:00
parent dc21777aa4
commit 8869da5ceb
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@
preserve_host: true
url: "http://accounts:3000"
match:
url: "http://oathkeeper<{,:4455}>/<{user,user/**}>"
url: "http://oathkeeper<{,:4455}>/<{user,user/**,track/**}>"
methods:
- GET
authenticators:

View File

@ -348,7 +348,7 @@ server {
if skylink and ngx.status >= ngx.HTTP_OK and ngx.status < ngx.HTTP_SPECIAL_RESPONSE then
local http = require("socket.http")
local headers = { Cookie = ngx.req.get_headers()["Cookie"] }
local ok, statusCode, headers, statusText = http.request { url = "http://accounts:3000/track/download/" .. skylink, method = "POST", headers = headers }
local ok, statusCode, headers, statusText = http.request { url = "http://oathkeeper:4455/track/download/" .. skylink, method = "POST", headers = headers }
if statusCode ~= ngx.HTTP_NO_CONTENT then
ngx.log(ngx.ERR, "accounts endpoint /track/download/" .. skylink .. " failed with error " .. statusCode)
end