Remove cacheControlFactory export (#33255)
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import FailBot from '../lib/failbot.js'
|
||||
import { nextApp } from './next.js'
|
||||
import { setFastlySurrogateKey, SURROGATE_ENUMS } from './set-fastly-surrogate-key.js'
|
||||
import { cacheControlFactory } from './cache-control.js'
|
||||
|
||||
const cacheControl = cacheControlFactory(60) // 1 minute
|
||||
import { errorCacheControl } from './cache-control.js'
|
||||
|
||||
function shouldLogException(error) {
|
||||
const IGNORED_ERRORS = [
|
||||
@@ -39,7 +37,7 @@ export default async function handleError(error, req, res, next) {
|
||||
// Let's cache our 404'ing assets conservatively.
|
||||
// The Cache-Control is short, and let's use the default surrogate
|
||||
// key just in case it was a mistake.
|
||||
cacheControl(res)
|
||||
errorCacheControl(res)
|
||||
// Makes sure the surrogate key is NOT the manual one if it failed.
|
||||
// This basically unsets what was assumed in the beginning of
|
||||
// loading all the middlewares.
|
||||
|
||||
Reference in New Issue
Block a user