Commit Graph

27 Commits

Author SHA1 Message Date
Stephen Morgan
55308e1ca8 lib,cli,ui,web: Remove unnecessary CPP when dropping support for GHC 8.2. 2021-06-07 17:33:54 -10:00
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
Simon Michael
ac5652b7cc ;web: fix redundant import warnings with ghc 8.8 2019-11-29 07:02:52 -08:00
Jakub Zárybnický
e8668e2a5c web: Conform layout to the rest of hledger-* packages 2018-06-24 14:18:06 +02:00
Simon Michael
cfbd8bb956 web: update for yesod 1.1.3
Build with latest yesod. Also reorganise to conform more closely with
yesod's standard scaffold layout to reduce upgrade effort.
2012-11-15 17:48:48 +00:00
Simon Michael
296a4d1bb2 web: better hamlet override 2012-04-03 17:53:12 +00:00
Simon Michael
64b6316785 web: revert unintended hunk in Settings.hs 2012-04-03 17:43:49 +00:00
Simon Michael
acc5139c54 tools: makefile updates 2012-04-03 17:12:47 +00:00
Simon Michael
f6f615196f web: define our own hamlet so it can be tweaked for debugging 2012-04-01 20:49:36 +00:00
Simon Michael
2912a11929 web: officially drop GHC 6.12 support, fix build warnings with 7.0, 7.2, 7.4 2012-03-29 23:24:48 +00:00
Simon Michael
c27707f578 web: bump version, upgrade to yesod 0.10 2012-03-05 07:52:36 +00:00
Simon Michael
9040821e8d web: fix ghc 6.12 incompatibility in Settings.hs 2011-10-26 17:30:17 +00:00
Simon Michael
5c07a465da web: simplify static path definitions 2011-10-04 22:44:39 +00:00
Simon Michael
7f91a97d19 fix yesod haddock breakage 2011-09-14 02:42:18 +00:00
Simon Michael
187a7a1cc7 web: obey at least some command-line options, like --cost
Report filtering options like --period, and filter pattern arguments, are still ignored.
2011-09-14 19:53:05 +00:00
Simon Michael
4c52dd5b76 web: production build now has all web content embedded, dev build uses ./static (#63) 2011-09-12 23:30:29 +00:00
Simon Michael
85b2307e78 web: modify the default base url when a custom port is specified 2011-09-19 03:25:12 +00:00
Simon Michael
7bc67a7f00 web: update for yesod 0.9 2011-09-12 18:41:43 +00:00
Simon Michael
cd0c945454 web: move code to Hledger.Web for importability, consistency 2011-08-05 23:55:57 +00:00
Simon Michael
dc6c3dec76 web: more yesod 0.8 migration; adopt the scaffolding app's layout, slightly simplified 2011-05-24 04:27:37 +00:00
Simon Michael
024cfdb7b1 web: upgrade to yesod 0.8 2011-05-21 02:52:42 +00:00
Simon Michael
4e672f1722 comments 2010-11-19 17:25:39 +00:00
Simon Michael
b5e1c42cc4 web: auto-create all required support files in ./.hledger/web at startup
This is a compromise to ease deployment and satisfy hamlet's requirements.
See the Hledger.Web.Files module for more info. Currently we exit after
creating the missing files since they are not created early enough for
hamlet.
2010-11-18 00:53:41 +00:00
Simon Michael
e04d44a745 web: disable persistence/authentication support for now 2010-11-15 23:25:32 +00:00
Simon Michael
8dd52decb2 web: simplify support files layout, look for them in ./.hledger/web/ 2010-11-16 17:13:32 +00:00
Simon Michael
96036e56a0 docs: comments 2010-09-22 21:51:25 +00:00
Simon Michael
63531f8adc web: update for cassius, julius, template reloading, authentication, persistence 2010-09-11 01:47:46 +00:00