8 Commits

Author SHA1 Message Date
Victor Vrantchan
b39018f84d Add viewer info to nav. 2021-02-20 22:03:04 -05:00
Victor Vrantchan
b69f92e907 redirect to / after login 2021-02-20 21:39:59 -05:00
Victor Vrantchan
ec514fd70e add form data to context
When calling frontend.Fail pass the form data in the context.
In case of an error, returns the values back so they're not reset on the
page.
2021-02-20 19:02:45 -05:00
Victor Vrantchan
7fd2c8b33f Return 404 errors for missing resources.
Update login and register forms to return the right errors when the user
info can't be found.
2021-02-20 17:48:04 -05:00
Victor Vrantchan
7d75f581ec Added users sessions (#696)
Added login/logout pages and respective database methods for handling users sessions.
2020-08-08 17:15:34 -04:00
Victor Vrantchan
cf94d41d9b Add validation error handling to framework 2020-07-25 20:28:46 -04:00
Victor Vrantchan
a8dc606beb Add CSRF middleware to all pages
The frontend server now runs a CSRF middleware on all paths except
/assets/. To enable CSRF the -csrf_key flag must be set. Instead of
enforcing the flag is set, I opted to log that CSRF is disabled. Not
running CSRF means I can test with curl.

In the future I might enforce that the flag must be set in release builds.
2020-07-22 23:22:03 -04:00
Victor Vrantchan
c71958384e build a simple web framework. (#691)
Added the basics for HTML templates, serving assets and so on.
2020-07-17 12:41:33 -04:00