feat(rewriter): add redirect(), get_cookie(), add_cookie() methods to rule engine (#36)
Some checks are pending
Cadoles/bouncer/pipeline/pr-develop Build started...
Some checks are pending
Cadoles/bouncer/pipeline/pr-develop Build started...
This commit is contained in:
@ -22,10 +22,10 @@ func WithResponse(ctx context.Context, r *http.Response) context.Context {
|
||||
return context.WithValue(ctx, contextKeyResponse, r)
|
||||
}
|
||||
|
||||
func ctxRequest(ctx context.Context) (*http.Request, bool) {
|
||||
func CtxRequest(ctx context.Context) (*http.Request, bool) {
|
||||
return rule.Context[*http.Request](ctx, contextKeyRequest)
|
||||
}
|
||||
|
||||
func ctxResponse(ctx context.Context) (*http.Response, bool) {
|
||||
func CtxResponse(ctx context.Context) (*http.Response, bool) {
|
||||
return rule.Context[*http.Response](ctx, contextKeyResponse)
|
||||
}
|
||||
|
Reference in New Issue
Block a user