hledger/hledger-web/Hledger/Web
Amarandus 76ffaca466 web: Add IPv6 and hostname support
This commit introduces IPv6 support (and thus closes #1145).
It also allows using local hostnames as a parameter for --host.
For this, multiple things needed to be changed:

 - checkWebOpts is dropped, as the supplied parameter is checked later
 by Network.Socket.getAddrInfo
 - defbaseurl needs to check if : is used in the host, as this indicates
 the usage of an IPv6 address. In this case, the host needs to be
 wrapped in [] for the base URL
 - To allow opening such a modified base URL, runHostPortFullUrl is used
 instead of runhostPortUrl, as it allows opening arbitrary URLs instead
 of a path prefixed with http://127.0.0.1

As checking the host for validity is postponed until the webserver tries
to start, an invalid hostname leads to an exception caused by
Network.Socket.getAddrInfo.
This is still fine, as hledger-web won't start in an undefined state, but
will terminate with a nonzero exit code.
2020-01-17 13:18:51 -08:00
..
Handler move JSON instances from hledger-web to hledger-lib 2019-12-16 17:17:00 -08:00
Settings web: Conform layout to the rest of hledger-* packages 2018-06-24 14:18:06 +02:00
Widget Use nubSort instead of nub . sort. 2020-01-04 08:31:10 -08:00
Application.hs web: Modify the --cors option to require a specific origin 2019-10-07 14:54:18 -10:00
Foundation.hs ;web: fix redundant import warnings with ghc 8.8 2019-11-29 07:02:52 -08:00
Import.hs web: Fix compilation errors for all 'stack.yaml's 2018-06-25 12:00:18 +02:00
Main.hs web: Add IPv6 and hostname support 2020-01-17 13:18:51 -08:00
Settings.hs web: Add IPv6 and hostname support 2020-01-17 13:18:51 -08:00
WebOptions.hs web: Add IPv6 and hostname support 2020-01-17 13:18:51 -08:00