Commit Graph

23 Commits

Author SHA1 Message Date
Henry 6a4c1e54d9 add default CSP and some other browser mitigations
Though, CSP is primarily a tool against cross-site scripting and we
don't plan to host any user-generated or 3rd party content it's still a
good practice.  The primary requirment with this rule is
 to move all inline style tags to a seperate file.
2021-02-22 14:39:45 +01:00
Henry aefa2a266c update login test to do the csrf dance
also: use pre-release of http/tester with better header handling
2021-02-22 14:19:21 +01:00
Henry f1f4e9dcb9 add CSRF protection
updates #14
2021-02-17 12:22:05 +01:00
Henry 99c2e95aa3 setup logging in http handlers (fixes #10)
in a http.Handler you can now do the following to log events:

logger := logging.FromContext(req.Context())
level.Info(logger).Log("event", "happend", ...)
2021-02-11 16:43:37 +01:00
Henry 830678c914 admindb: add migrations based on rubenv/sql-migrate
This removes the nasty need for creating the database manually.

Migrations are kept in an embedded filesystem, just like the templates
and assets for the web frontend. The same -tags dev trick applies for
them.
2021-02-09 16:49:48 +01:00
Henry 31cbf00c93 use new auth.SetErrorHandler option 2021-02-09 13:40:57 +01:00
Henry ef4a2f3f22 sqlite and auth setup 2021-02-08 17:47:42 +01:00
Henry 01ed66d6df basic auth middleware setup 2021-02-08 13:02:45 +01:00
Henry 2d38db1bc7 embedded templates 2021-02-04 17:25:39 +01:00
Henry f741065836 add i18n support
TODO: default files once embedded assets are there
2021-02-04 16:52:55 +01:00
Henry 0a67bf690b some cleanup and a Readme 2021-02-04 14:13:52 +01:00
Henry 98ca4f8408 examples for the news/ section 2021-02-04 12:00:12 +01:00
Henry fdf11f9a23 start http and html skelleton 2021-02-04 11:36:02 +01:00
Henry f31de7faa1 use newer muxrpc with Handled() 2021-02-02 17:45:17 +01:00
Henry 9b368d79b6 update muxrpc branch 2021-01-28 15:07:55 +01:00
Henry d977998a4c muxrpc with fixed packet skipping 2021-01-28 11:02:11 +01:00
Henry 457d6f2f03 typo.. 2021-01-27 11:50:17 +01:00
Henry b50f052e66 update muxrpc v2 branch 2021-01-27 11:38:45 +01:00
Henry be5f248c93 imports cleanup 2021-01-27 10:01:35 +01:00
Henry 994a76cd67 whoops2 2021-01-25 18:43:32 +01:00
Henry b176ff51c4 whoops 2021-01-25 18:41:36 +01:00
Henry 678720a4a3 pin muxrpc 2021-01-25 18:39:11 +01:00
Henry 6b90c96a5d room sever skeleton 2021-01-25 13:50:51 +01:00