mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-05-10 06:48:26 +00:00
Disable caching
This commit is contained in:
parent
5c2fac9352
commit
83dfab56c1
@ -227,6 +227,13 @@ function mergeCORSHeader(reqHeader,originHeader){
|
||||
targetObj["access-control-allow-methods"] = "GET, POST, PUT";
|
||||
targetObj["access-control-allow-headers"] = reqHeader['access-control-request-headers'] || "-___-||";
|
||||
|
||||
// Disable caching
|
||||
// If the response status is 304 not modified, the data event of response will not emmit
|
||||
targetObj["Transfer-Encoding"] = "chunked"
|
||||
targetObj["Cache-Control"] = "no-cache, no-store, must-revalidate";
|
||||
targetObj["Pragma"] = "no-cache";
|
||||
targetObj["Expires"] = 0;
|
||||
|
||||
return targetObj;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user