socket-function 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -175,8 +175,8 @@ export async function httpCallHandler(request: http.IncomingMessage, response: h
175
175
 
176
176
  // NOTE: Our ETag caching is only to reduce data sent on the wire, we evaluate the calls
177
177
  // every time (so it is strictly a wire cache, not computation cache)
178
- response.setHeader("cache-control", "private, s-maxage=0, max-age=0, must-revalidate");
179
178
  if (SocketFunction.httpETagCache) {
179
+ response.setHeader("cache-control", "private, s-maxage=0, max-age=0, must-revalidate");
180
180
  let hash = sha256Hash(resultBuffer);
181
181
  response.setHeader("ETag", hash);
182
182
  if (request.headers["if-none-match"] === hash) {