Skip to content

Commit

Permalink
Print request headers when debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-z committed Oct 30, 2023
1 parent c39ec1d commit 3d57884
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM python:3.11.5-slim

COPY . /app
COPY requirements.txt /app/
WORKDIR /app

RUN pip install -r requirements.txt

COPY . /app

CMD ["python", "/app/app.py"]
2 changes: 2 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import flask
import requests
from flask_cors import CORS
from flask import request
import logging

ALLOWED_SENTRY_HOSTS = [s.strip() for s in os.environ.get("ALLOWED_SENTRY_HOSTS", "").split(",")]
Expand All @@ -21,6 +22,7 @@

@app.route("/tunnel", methods=["POST"])
def tunnel():
logging.debug(f"Request headers: {request.headers}")
try:
envelope = flask.request.data
piece = envelope.split(b"\n")[0].decode("utf-8")
Expand Down

0 comments on commit 3d57884

Please sign in to comment.