mirror of
https://github.com/HabitRPG/habitica.git
synced 2026-04-28 04:42:59 -05:00
79087b27d3ca05d02927212fa18de03bffa9aebd
The parsing in the redirects module was simply determining the base host via trimming off everything up to //, so a BASE_URL like "http://localhost:3000" will result in the host name "localhost:3000", which isn't a valid host name. So the problem here is that BASE_URL_HOST is used for determining whether the client should be redirected and it's comparing the hostname of the request object with BASE_URL_HOST. For example if we have the aforementioned BASE_URL, we get to the following comparison: req.hostname !== BASE_URL_HOST Which expands to: "localhost" !== "localhost:3000" So in order to get rid of the port number, we now use url.parse() to get the right host name. Signed-off-by: aszlig <aszlig@nix.build>
Habitica

Habitica is an open source habit building program which treats your life like a Role Playing Game. Level up as you succeed, lose HP as you fail, earn money to buy weapons and armor.
We need more programmers! Your assistance will be greatly appreciated.
For an introduction to the technologies used and how the software is organized, refer to Guidance for Blacksmiths.
To set up a local install of Habitica for development and testing on various platforms, see Setting up Habitica Locally.
Description
Releases
125
Languages
JavaScript
51.7%
Vue
23.8%
CSS
23.7%
SCSS
0.7%