Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-12-01 06:16:09 +01:00
forgejo/services/auth
zeripath bb0ff77e46
Share HTML template renderers and create a watcher framework (#20218)
The recovery, API, Web and package frameworks all create their own HTML
Renderers. This increases the memory requirements of Gitea
unnecessarily with duplicate templates being kept in memory.

Further the reloading framework in dev mode for these involves locking
and recompiling all of the templates on each load. This will potentially
hide concurrency issues and it is inefficient.

This PR stores the templates renderer in the context and stores this
context in the NormalRoutes, it then creates a fsnotify.Watcher
framework to watch files.

The watching framework is then extended to the mailer templates which
were previously not being reloaded in dev.

Then the locales are simplified to a similar structure.

Fix #20210 
Fix #20211
Fix #20217

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-08-28 10:43:25 +01:00
..
source Fix typo in source (#20723) 2022-08-09 09:53:40 +08:00
auth.go Remove dependent on session auth for api/v1 routers (#19321) 2022-04-08 06:22:10 +02:00
auth_test.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
basic.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
group.go Share HTML template renderers and create a watcher framework (#20218) 2022-08-28 10:43:25 +01:00
httpsign.go Implement http signatures support for the API (#17565) 2022-06-05 08:16:14 +01:00
interface.go Share HTML template renderers and create a watcher framework (#20218) 2022-08-28 10:43:25 +01:00
oauth2.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
reverseproxy.go auth/reverseproxy: Add support for full name (#20776) 2022-08-16 14:30:27 +08:00
session.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
signin.go Restore user autoregistration with email addresses (#19261) 2022-03-31 15:20:25 +02:00
source.go Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
sspi_windows.go Share HTML template renderers and create a watcher framework (#20218) 2022-08-28 10:43:25 +01:00
sync.go Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00