diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-07-11 16:24:09 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-11 16:24:09 +1000 |
| commit | f115f77df8302f35f37fde3a87362f4f94600ce1 (patch) | |
| tree | 4a697c133e3a71482316a90b1d43529741d6f242 /internal/middlewares/util.go | |
| parent | 897558aba2df2142f827027ec79b890a7bcda739 (diff) | |
fix(web): offline_access consent description (#3679)
Diffstat (limited to 'internal/middlewares/util.go')
| -rw-r--r-- | internal/middlewares/util.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/middlewares/util.go b/internal/middlewares/util.go new file mode 100644 index 000000000..23f58f01a --- /dev/null +++ b/internal/middlewares/util.go @@ -0,0 +1,15 @@ +package middlewares + +import ( + "github.com/valyala/fasthttp" +) + +// SetContentTypeApplicationJSON sets the Content-Type header to `application/json; charset=utf8`. +func SetContentTypeApplicationJSON(ctx *fasthttp.RequestCtx) { + ctx.SetContentTypeBytes(contentTypeApplicationJSON) +} + +// SetContentTypeTextPlain sets the Content-Type header to `text/plain; charset=utf8`. +func SetContentTypeTextPlain(ctx *fasthttp.RequestCtx) { + ctx.SetContentTypeBytes(contentTypeTextPlain) +} |
