mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-29 01:42:37 +02:00
Remove strict_slashes for /
I don't know why, but on my setup (nginx + uwsgi), the `strict_slashes` (default to `True`) was causing an infinite loop. I think it could be safely removed for this route only.
This commit is contained in:
parent
633e3543b2
commit
c1b5eb1375
3 changed files with 8 additions and 1 deletions
|
@ -13,6 +13,7 @@ Fixed
|
||||||
- Fix broken install with pip ≥ 10 (#340)
|
- Fix broken install with pip ≥ 10 (#340)
|
||||||
- Fix the generation of the supervisord template (#309)
|
- Fix the generation of the supervisord template (#309)
|
||||||
- Fix the validation of the hashed password (#310)
|
- Fix the validation of the hashed password (#310)
|
||||||
|
- Fix infinite loop that happened when accessing / (#358)
|
||||||
|
|
||||||
Added
|
Added
|
||||||
=====
|
=====
|
||||||
|
|
|
@ -1434,6 +1434,12 @@ class APITestCase(IhatemoneyTestCase):
|
||||||
|
|
||||||
class ServerTestCase(IhatemoneyTestCase):
|
class ServerTestCase(IhatemoneyTestCase):
|
||||||
|
|
||||||
|
def test_homepage(self):
|
||||||
|
# See https://github.com/spiral-project/ihatemoney/pull/358
|
||||||
|
self.app.config['APPLICATION_ROOT'] = '/'
|
||||||
|
req = self.client.get("/")
|
||||||
|
self.assertStatus(200, req)
|
||||||
|
|
||||||
def test_unprefixed(self):
|
def test_unprefixed(self):
|
||||||
self.app.config['APPLICATION_ROOT'] = '/'
|
self.app.config['APPLICATION_ROOT'] = '/'
|
||||||
req = self.client.get("/foo/")
|
req = self.client.get("/foo/")
|
||||||
|
|
|
@ -198,7 +198,7 @@ def authenticate(project_id=None):
|
||||||
return render_template("authenticate.html", form=form)
|
return render_template("authenticate.html", form=form)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/")
|
@main.route("/", strict_slashes=False)
|
||||||
def home():
|
def home():
|
||||||
project_form = ProjectForm()
|
project_form = ProjectForm()
|
||||||
auth_form = AuthenticationForm()
|
auth_form = AuthenticationForm()
|
||||||
|
|
Loading…
Reference in a new issue