diff --git a/core/server/api/canary/newsletters.js b/core/server/api/canary/newsletters.js index 7776fb1a03..585e769366 100644 --- a/core/server/api/canary/newsletters.js +++ b/core/server/api/canary/newsletters.js @@ -69,6 +69,9 @@ module.exports = { add: { statusCode: 201, + headers: { + cacheInvalidate: true + }, options: [ 'include', 'opt_in_existing' @@ -87,7 +90,9 @@ module.exports = { }, edit: { - headers: {}, + headers: { + cacheInvalidate: true + }, options: [ 'id', 'include' diff --git a/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap b/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap index 81dd069f91..748b837f9e 100644 --- a/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap +++ b/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap @@ -44,6 +44,7 @@ Object { "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//, "vary": "Origin, Accept-Encoding", + "x-cache-invalidate": "/*", "x-powered-by": "Express", } `; @@ -94,6 +95,7 @@ Object { "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//, "vary": "Origin, Accept-Encoding", + "x-cache-invalidate": "/*", "x-powered-by": "Express", } `; @@ -139,6 +141,7 @@ Object { "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//, "vary": "Origin, Accept-Encoding", + "x-cache-invalidate": "/*", "x-powered-by": "Express", } `; @@ -317,6 +320,7 @@ Object { "content-type": "application/json; charset=utf-8", "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "vary": "Origin, Accept-Encoding", + "x-cache-invalidate": "/*", "x-powered-by": "Express", } `; @@ -361,6 +365,7 @@ Object { "content-type": "application/json; charset=utf-8", "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "vary": "Origin, Accept-Encoding", + "x-cache-invalidate": "/*", "x-powered-by": "Express", } `;