From 55368b1c1ab851f86f38b7f92f39524631e27adc Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Mon, 13 Nov 2017 11:32:32 -0700 Subject: [PATCH] Fix bug with one letter routes --- handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers.go b/handlers.go index 8e2af88..0a6806c 100755 --- a/handlers.go +++ b/handlers.go @@ -285,7 +285,7 @@ func handlePageRequest(c *gin.Context) { versionsChangeSums = reverseSliceInt(versionsChangeSums) } - if command[0:3] == "/ra" { + if len(command) > 3 && command[0:3] == "/ra" { c.Writer.Header().Set("Content-Type", contentType(p.Name)) c.Writer.Header().Set("Access-Control-Allow-Origin", "*") c.Writer.Header().Set("Access-Control-Max-Age", "86400")