Skip to content

Flask server - Method not allowed #10

Closed

Description

@vladko312

Currently, your Flask server supports only GET request (default), so testing results are not reflecting header processing quirks.

To enable other methods, @app.route decorators could be replaced by direct route adding:

import sys
from flask import Flask
from werkzeug.routing import Rule

app = Flask(__name__)

app.url_map.add(Rule('/', defaults={"path": ""}, endpoint='catch_all'))
app.url_map.add(Rule('/<path:path>', endpoint='catch_all'))

@app.endpoint('catch_all')
def catch_all(path):
    return "OK"

if __name__ == "__main__":
    port = int(sys.argv[1]) if len(sys.argv) > 1 else 9002
    app.run(host="0.0.0.0", port=port)

Activity

  1. MDA2AV commented on Feb 11, 2026

    @MDA2AV
    Owner

    Absolutely, just confirmed it. The POST tests are no longer 405.
    Thank you, you can see the immediate updated Flask results here.

    Should take ~45 min to update on the website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions