Files
hadrian/proxychain/responsemodifiers/modify_response_header.go
2023-12-07 08:43:05 -06:00

22 lines
575 B
Go

package responsemodifiers
import (
"ladder/proxychain"
)
// SetResponseHeader modifies response headers from the upstream server
func SetResponseHeader(key string, value string) proxychain.ResponseModification {
return func(chain *proxychain.ProxyChain) error {
chain.Context.Set(key, value)
return nil
}
}
// DeleteResponseHeader removes response headers from the upstream server
func DeleteResponseHeader(key string) proxychain.ResponseModification {
return func(chain *proxychain.ProxyChain) error {
chain.Context.Response().Header.Del(key)
return nil
}
}