mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Fix bug with one letter routes
This commit is contained in:
parent
7cc1eccb83
commit
55368b1c1a
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user