public static ApplyGlobalResponseHeaders ( this httpRes ) : void | ||
httpRes | this | |
return | void |
public static void ApplyGlobalResponseHeaders(this HttpListenerResponse httpRes)
{
if (HostContext.Config == null) return;
foreach (var globalResponseHeader in HostContext.Config.GlobalResponseHeaders)
{
httpRes.AddHeader(globalResponseHeader.Key, globalResponseHeader.Value);
}
}