From 4117775cf076a12647443d02bdd6780002190f39 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 11 Nov 2022 05:23:55 +0100 Subject: [PATCH] fix raw serve --- server/upstream/upstream.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/upstream/upstream.go b/server/upstream/upstream.go index 38b7d1a..e6ed4c7 100644 --- a/server/upstream/upstream.go +++ b/server/upstream/upstream.go @@ -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 {