Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AB#117091 Fix postrequests #547

Merged
merged 1 commit into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion jwtproxy/src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,18 @@ async def handle(req: web.Request):
app_logger.debug("Proxy-URL: \n%s", target_url)
app_logger.debug("Request params: \n %s", req.rel_url.query)
app_logger.debug("Request headers: \n %s", req.headers)


if token is not None:
await audit(req, token)

body = None
if req.can_read_body:
body = await req.text()
app_logger.debug("Request body: \n %s", body)

async with SessionManager.session().request(
req.method, target_url, headers=req.headers, params=req.rel_url.query
req.method, target_url, headers=req.headers, params=req.rel_url.query, data=body
) as resp:
app_logger.debug("Response status from upstream: %s", resp.status)
app_logger.debug("Headers from upstream: \n %s", resp.headers)
Expand Down
Loading