summaryrefslogtreecommitdiff
path: root/internal/router
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-08-02 09:28:20 +0100
committerLibravatar GitHub <noreply@github.com>2023-08-02 10:28:20 +0200
commit24516b84c24d944b82d6cf79e9c88f762c8e132d (patch)
tree532e5885b4eea237cef1ad43d19ffd6086ef07e5 /internal/router
parent[bugfix] Allow instance accounts to be shown in search results in certain cir... (diff)
downloadgotosocial-24516b84c24d944b82d6cf79e9c88f762c8e132d.tar.xz
[bugfix] handle HEAD requests more elegantly (#2055)
Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/router')
-rw-r--r--internal/router/router.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/router/router.go b/internal/router/router.go
index 47835e5bc..b6991f97f 100644
--- a/internal/router/router.go
+++ b/internal/router/router.go
@@ -181,6 +181,7 @@ func New(ctx context.Context) (Router, error) {
// create the actual engine here -- this is the core request routing handler for gts
engine := gin.New()
engine.MaxMultipartMemory = maxMultipartMemory
+ engine.HandleMethodNotAllowed = true
// set up IP forwarding via x-forward-* headers.
trustedProxies := config.GetTrustedProxies()