Commit Graph

24 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 158ef5221e web/i18n: Add defaults and test for labels (fixes #8) 2021-02-10 14:39:38 +01:00
Henry fec92d428c change name to go-ssb-room
It has been brought to my attention that "gossb" reads like "gossip..?"
to the untrained eye. That's just confusing.

Also the project hosts a single room so the plural was just wrong.
2021-02-09 17:38:51 +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 f71020d5d9 cleanup go.mod and pin new http/auth version 2021-02-09 13:27:11 +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 e9013a0c6b change import path
this is part of the NGI work and should be clearly indicated as such
2021-02-04 16:54:30 +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 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 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 678720a4a3 pin muxrpc 2021-01-25 18:39:11 +01:00
Henry f4dc1b1f42 first simple test 2021-01-25 16:35:22 +01:00
Henry 6b90c96a5d room sever skeleton 2021-01-25 13:50:51 +01:00
Henry f325ed5cf3 init 2021-01-25 11:39:05 +01:00