Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/run/handlers/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default async (
})
}

setCacheControlHeaders(response, request, requestContext, nextConfig)
setCacheControlHeaders(response, request, requestContext)
setCacheTagsHeaders(response.headers, requestContext)
setVaryHeaders(response.headers, request, nextConfig)
setCacheStatusHeader(response.headers, nextCache)
Expand Down
10 changes: 1 addition & 9 deletions src/run/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { NextConfigComplete } from 'next/dist/server/config-shared.js'

import type { NetlifyCachedRouteValue, NetlifyCacheHandlerValue } from '../shared/cache-types.cjs'

import { getLogger, RequestContext } from './handlers/request-context.cjs'
import { RequestContext } from './handlers/request-context.cjs'
import { recordWarning } from './handlers/tracer.cjs'
import { getMemoizedKeyValueStoreBackedByRegionalBlobStore } from './storage/storage.cjs'

Expand Down Expand Up @@ -200,7 +200,6 @@ export const setCacheControlHeaders = (
{ headers, status }: Response,
request: Request,
requestContext: RequestContext,
nextConfig: NextConfigComplete,
) => {
if (
typeof requestContext.routeHandlerRevalidate !== 'undefined' &&
Expand All @@ -213,13 +212,6 @@ export const setCacheControlHeaders = (
return
}

// temporary diagnostic to evaluate number of trailing slash redirects
if (status === 308 && request.url.endsWith('/') !== nextConfig.trailingSlash) {
getLogger()
.withFields({ trailingSlash: nextConfig.trailingSlash, location: headers.get('location') })
.log('NetlifyHeadersHandler.trailingSlashRedirect')
}

const cacheControl = headers.get('cache-control')
if (status === 404) {
if (request.url.endsWith('.php')) {
Expand Down
Loading