Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,17 @@ jobs:
nc -z localhost 5005
sleep 2
kill $PID

code_standards:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.9.25
cache: 'pip'
- run: pip install -r requirements-dev.txt
id: pip
- run: black --check .
- run: flake8 .
if: success() || failure() && steps.pip.outcome == 'success'
1 change: 0 additions & 1 deletion extensions/override/override.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


def get_override_status():
global override_active
return override_active


Expand Down
1 change: 0 additions & 1 deletion extensions/waybackmachine/waybackmachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@


def get_override_status():
global override_active
return override_active


Expand Down
7 changes: 5 additions & 2 deletions proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def handle_image_request(url):
@app.route("/", defaults={"path": "/"}, methods=["GET", "POST"])
@app.route("/<path:path>", methods=["GET", "POST"])
def handle_request(path):
global override_extension
parsed_url = urlparse(request.url)
scheme = parsed_url.scheme
host = parsed_url.netloc.split(":")[0] # Remove port if present
Expand Down Expand Up @@ -385,7 +384,11 @@ def process_response(response, url):

response = Response(content, status_code)
for key, value in headers.items():
if key.lower() not in ["content-encoding", "content-length", "transfer-encoding"]:
if key.lower() not in [
"content-encoding",
"content-length",
"transfer-encoding",
]:
response.headers[key] = value

debug_print("Finished processing response")
Expand Down