mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 15:32:25 -05:00
[feature/performance] Wrap incoming HTTP requests in timeout handler (#2353)
* deinterface router, start messing about with deadlines * weeeee * thanks linter (thinter) * write Connection: close when timing out requests * update wording * don't replace req * don't bother with fancy Cause functions (I'll use them one day...)
This commit is contained in:
parent
7753f42132
commit
8d0c017cf2
14 changed files with 305 additions and 175 deletions
|
|
@ -33,7 +33,7 @@ import (
|
|||
//
|
||||
// If the environment variable GTS_WEB_TEMPLATE_BASE_DIR set, it will take that
|
||||
// value as the template base directory instead.
|
||||
func NewTestRouter(db db.DB) router.Router {
|
||||
func NewTestRouter(db db.DB) *router.Router {
|
||||
if alternativeTemplateBaseDir := os.Getenv("GTS_WEB_TEMPLATE_BASE_DIR"); alternativeTemplateBaseDir != "" {
|
||||
config.Config(func(cfg *config.Configuration) {
|
||||
cfg.WebTemplateBaseDir = alternativeTemplateBaseDir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue