Syeda Persia Aziz created TS-3831:
-------------------------------------

             Summary: Overridable error response type
                 Key: TS-3831
                 URL: https://issues.apache.org/jira/browse/TS-3831
             Project: Traffic Server
          Issue Type: New Feature
          Components: Configuration
            Reporter: Syeda Persia Aziz


ATS has a set of error pages in the folder body_factory, namely 
access#denied.html, access#proxy_auth_required.html,connect#dns_failed.html... 
etc. All these error pages are loaded in a RawHashTable. When there is an error 
for e.g. access denied,  ATS builds a error response of type access#denied. We 
can have an overridable config that will decide which custom error page to send 
to the client. This config will be set per remap rule. We can have the custom 
error pages in the body_factory folder and these pages will follow a specific 
naming convention for e.g. $var_access#denied.html, 
$var_proxy_auth_required.html, ….. Here $var is the overridable config 
(proxy.config.error.response.type). 

Example: 
in Remap.config

map www.abcxyz.com www.efgijk.com @plugin=config.so 
@pparam=proxy.config.error.response.type=yahoo

Now, if there is for e.g. a 'access denied' error, the build_error_response 
will build a customized error response of type yahoo_access#denied . If it can 
not find the type yahoo_access#denied, then it will simply build the default 
access#denied error response. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to