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:
parent
2a43ebdb53
commit
df406ec71b
@ -400,7 +400,7 @@ func handlePageRequest(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(command) > 3 && 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("Content-Type", "text/plain")
|
||||||
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
|
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
|
||||||
c.Writer.Header().Set("Access-Control-Max-Age", "86400")
|
c.Writer.Header().Set("Access-Control-Max-Age", "86400")
|
||||||
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE")
|
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE")
|
||||||
|
Loading…
Reference in New Issue
Block a user