mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-05 14:07:01 +00:00
fix raw serve
This commit is contained in:
parent
7f2854d537
commit
4117775cf0
1 changed files with 2 additions and 2 deletions
|
@ -156,9 +156,9 @@ func (o *Options) Upstream(ctx *context.Context, giteaClient *gitea.Client) (fin
|
|||
ctx.Response().Header.Set(gitea.PagesCacheIndicatorHeader, header.Get(gitea.PagesCacheIndicatorHeader))
|
||||
ctx.Response().Header.Set(gitea.ContentLengthHeader, header.Get(gitea.ContentLengthHeader))
|
||||
if o.ServeRaw {
|
||||
ctx.Response().Header.Set(gitea.ContentTypeHeader, header.Get(gitea.ContentTypeHeader))
|
||||
} else {
|
||||
ctx.Response().Header.Set(gitea.ContentTypeHeader, rawMime)
|
||||
} else {
|
||||
ctx.Response().Header.Set(gitea.ContentTypeHeader, header.Get(gitea.ContentTypeHeader))
|
||||
}
|
||||
|
||||
if ctx.Response().StatusCode != http.StatusNotFound {
|
||||
|
|
Loading…
Reference in a new issue