1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-06 10:25:22 +02:00

Refactor HTTP request context (#17979)

This commit is contained in:
wxiaoguang 2021-12-15 14:59:57 +08:00 committed by GitHub
parent 9d943bf374
commit 4da1d97810
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 139 additions and 177 deletions

View file

@ -65,7 +65,7 @@ func goGet(ctx *context.Context) {
if appURL.Scheme == string(setting.HTTP) {
insecure = "--insecure "
}
ctx.Header().Set("Content-Type", "text/html")
ctx.RespHeader().Set("Content-Type", "text/html")
ctx.Status(http.StatusOK)
_, _ = ctx.Write([]byte(com.Expand(`<!doctype html>
<html>