mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 19:40:50 +00:00
jsonp set header to javascript
This commit is contained in:
parent
0b74db64eb
commit
1fedaf21ec
@ -255,7 +255,7 @@ func (c *Controller) ServeJsonp() {
|
||||
callback_content.WriteString("(")
|
||||
callback_content.Write(content)
|
||||
callback_content.WriteString(");\r\n")
|
||||
c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/json;charset=UTF-8")
|
||||
c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/javascript;charset=UTF-8")
|
||||
c.writeToWriter(callback_content.Bytes())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user