1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Raw pages are always shown text/plain (fix #127)

This commit is contained in:
Daniel Heath 2018-04-01 10:06:51 +10:00
parent 2a43ebdb53
commit df406ec71b

View File

@ -400,7 +400,7 @@ func handlePageRequest(c *gin.Context) {
}
if len(command) > 3 && command[0:3] == "/ra" {
c.Writer.Header().Set("Content-Type", contentType(p.Name))
c.Writer.Header().Set("Content-Type", "text/plain")
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
c.Writer.Header().Set("Access-Control-Max-Age", "86400")
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE")