Add / to Accel Header
This commit is contained in:
parent
c0be366ed5
commit
147f83e696
|
@ -200,7 +200,7 @@ func getFile(c *gin.Context) {
|
||||||
|
|
||||||
if viper.GetBool("XAccel") {
|
if viper.GetBool("XAccel") {
|
||||||
c.Header("Content-Disposition", "attatchment; filename="+parts[len(parts)-1])
|
c.Header("Content-Disposition", "attatchment; filename="+parts[len(parts)-1])
|
||||||
c.Header("X-Accel-Redirect", URL.FileName.String)
|
c.Header("X-Accel-Redirect", "/"+URL.FileName.String)
|
||||||
} else {
|
} else {
|
||||||
c.FileAttachment(file, parts[len(parts)-1])
|
c.FileAttachment(file, parts[len(parts)-1])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue