mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
16 lines
475 B
Go
16 lines
475 B
Go
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)
|
|
}
|