mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-12 15:59:30 -05:00
Website mode doesn't need to support POST as a method
This commit is contained in:
parent
97922d33d0
commit
dc4eaffa97
@ -37,8 +37,8 @@ class WebsiteModeWeb(SendBaseModeWeb):
|
|||||||
The web app routes for sharing a website
|
The web app routes for sharing a website
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@self.web.app.route("/", defaults={"path": ""}, methods=["GET", "POST"], provide_automatic_options=False)
|
@self.web.app.route("/", defaults={"path": ""}, methods=["GET"], provide_automatic_options=False)
|
||||||
@self.web.app.route("/<path:path>", methods=["GET", "POST"], provide_automatic_options=False)
|
@self.web.app.route("/<path:path>", methods=["GET"], provide_automatic_options=False)
|
||||||
def path_public(path):
|
def path_public(path):
|
||||||
return path_logic(path)
|
return path_logic(path)
|
||||||
|
|
||||||
|
@ -112,6 +112,6 @@ class TestWebsite(GuiBaseTest):
|
|||||||
self.run_all_website_mode_setup_tests(tab)
|
self.run_all_website_mode_setup_tests(tab)
|
||||||
self.run_all_website_mode_started_tests(tab)
|
self.run_all_website_mode_started_tests(tab)
|
||||||
url = f"http://127.0.0.1:{tab.app.port}/"
|
url = f"http://127.0.0.1:{tab.app.port}/"
|
||||||
self.hit_405(url, expected_resp="OnionShare: 405 Method Not Allowed", data = {'foo':'bar'}, methods = ["put", "delete", "options"])
|
self.hit_405(url, expected_resp="OnionShare: 405 Method Not Allowed", data = {'foo':'bar'}, methods = ["put", "post", "delete", "options"])
|
||||||
|
|
||||||
self.close_all_tabs()
|
self.close_all_tabs()
|
||||||
|
Loading…
Reference in New Issue
Block a user