Apache Proxy CORS on end server being down or timing out -
i using angularjs on ui , cant tell difference between server being down or timeout both respond following. due cors. when server down or request times out apache not add cors header.
"{"data":null,"status":0,"config":{"method":"get","transformrequest":[null],"transformresponse":[null],"url":"https://api.domain.com/containers/60539","headers":{"accept":"application/json, text/plain, */*"}},"statustext":""}"
how can make sure proper 502/503 statuses apache on request while having 200 on options?
thank you!
current config:
<virtualhost *:443> servername api.domain.com <ifmodule proxy_module> proxyrequests off sslproxyengine on sslproxyverify none sslproxycheckpeercn off sslproxycheckpeername off proxypass / 1.1.1.1 header set access-control-allow-origin "*" header set cache-control "max-age=0, no-cache, no-store, must-revalidate" header set pragma "no-cache" header set expires "wed, 11 jan 1984 05:00:00 gmt" </ifmodule> sslengine on sslcertificatefile "${wildcardsslcrt}" sslcertificatekeyfile "${wildcardsslkey}" sslcertificatechainfile "${wildcardsslchain}" </virtualhost>
instead of header set
use header set
:
header set access-control-allow-origin "*"
https://httpd.apache.org/docs/current/mod/mod_headers.html#header explains:
the table corresponds
always
used locally generated error responses successful responses.
and couple of guides guidance:
Comments
Post a Comment