add raw handler support

This commit is contained in:
Kevin Pham
2023-12-07 08:43:05 -06:00
parent 6a5b85f260
commit 4779229b32
6 changed files with 56 additions and 10 deletions

View File

@@ -530,7 +530,10 @@ func (chain *ProxyChain) Execute() error {
}
// in case api user did not set or forward content-type, we do it for them
if chain.Context.Get("content-type") == "" {
// warning: the fiber method chain.Context.Get() doesn't seem to work as described
ct := chain.Context.Response().Header.Peek("content-type")
CT := chain.Context.Response().Header.Peek("Content-Type")
if ct == nil && CT == nil {
chain.Context.Set("content-type", chain.Response.Header.Get("content-type"))
}