Skip to content

Commit c586560

Browse files
committed
Consistently use req.get
1 parent 62dedf7 commit c586560

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fixtures/flight/server/global.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async function renderApp(req, res, next) {
102102
proxiedHeaders['Content-type'] = req.get('Content-type');
103103
}
104104
if (req.headers['cache-control']) {
105-
proxiedHeaders['Cache-Control'] = req.headers['cache-control'];
105+
proxiedHeaders['Cache-Control'] = req.get('cache-control');
106106
}
107107

108108
const requestsPrerender = req.path === '/prerender';

fixtures/flight/server/region.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ async function prerenderApp(res, returnValue, formState, noCache) {
161161
}
162162

163163
app.get('/', async function (req, res) {
164-
const noCache = req.headers['cache-control'] === 'no-cache';
164+
const noCache = req.get('cache-control') === 'no-cache';
165165

166166
if ('prerender' in req.query) {
167167
await prerenderApp(res, null, null, noCache);

0 commit comments

Comments
 (0)