[
https://issues.apache.org/jira/browse/TS-3966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15018918#comment-15018918
]
ASF GitHub Bot commented on TS-3966:
------------------------------------
GitHub user zwoop opened a pull request:
https://github.com/apache/trafficserver/pull/346
TS-3966 Allow for pre-origin requests to be denied in header_rewrite
This generalizes the concept of set-status, such that it also works in
remap read-request hooks. I.e. prior to having a status code from cache
/ origin. This avoids going to origin before we can reject a request.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zwoop/trafficserver TS-3966
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/346.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #346
----
commit 702d93558772029c150248f09263f1716e56864d
Author: Leif Hedstrom <[email protected]>
Date: 2015-10-20T18:17:32Z
TS-3966 header_rewrite now allows pre-origin requests to be denied
This generalizes the concept of set-status, such that it also works in
remap read-request hooks. I.e. prior to having a status code from cache
/ origin. This avoids going to origin before we can reject a request.
----
> header_rewrite does not allow to deny requests in remap / read-request-her
> hook
> -------------------------------------------------------------------------------
>
> Key: TS-3966
> URL: https://issues.apache.org/jira/browse/TS-3966
> Project: Traffic Server
> Issue Type: Improvement
> Components: Plugins
> Reporter: Leif Hedstrom
> Assignee: Leif Hedstrom
> Fix For: 6.1.0
>
>
> It'd be nice if I could use e.g.
> {code}
> set-status 403
> {code}
> in a a header_rewrite rule for remap rules, or read-request-header hooks.
> But, this does not work today, you have to let it slip through to origin, and
> then modify the response status code in a send-response-header hook.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)