pelias-deprecated / compare-v1

simple frontend app for comparing apples
https://pelias.github.io/compare/
2 stars 0 forks source link

Fix redirect loop #20

Closed orangejulius closed 4 years ago

orangejulius commented 4 years ago

It looks like the redirect loop problem we've been having is caused by the full URL being decoded and re-appended to the path. This change seems to fix it without breaking anything else.

Fixes https://github.com/pelias/compare/issues/16

orangejulius commented 4 years ago

I double checked this again today (it was written late at night).

Normal behavior seems to work well, and putting a # character in the query bar still works fine. So we can still test queries with a # from, for example, a unit number.

Putting a # character in the URL bar however, will truncate the resulting query at that character, without creating a redirect loop.

Those redirect loops are serious and despite the rate limit we set on the demo keys for the compare app, can actually cause serious server issues. Because of this importance I'm going to merge it, but if anyone finds any issues be sure to let us know.