Skip to content

Commit bd6cde1

Browse files
alan-agius4vikerman
authored andcommitted
fix(builders): remove cache-control header from responses
1 parent ee57740 commit bd6cde1

File tree

1 file changed

+10
-1
lines changed
  • modules/builders/src/ssr-dev-server

1 file changed

+10
-1
lines changed

modules/builders/src/ssr-dev-server/index.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,16 @@ async function startBrowserSync(
142142
const bsPort = port || await getAvailablePort();
143143

144144
const instance = browserSync.init({
145-
proxy: `localhost:${nodeServerPort}`,
145+
proxy: {
146+
target: `localhost:${nodeServerPort}`,
147+
proxyRes: [
148+
proxyRes => {
149+
if ('headers' in proxyRes) {
150+
proxyRes.headers['cache-control'] = undefined;
151+
}
152+
},
153+
]
154+
},
146155
port: bsPort,
147156
ui: false,
148157
server: false,

0 commit comments

Comments
 (0)