Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5e0e71b

Browse filesBrowse files
committed
chore: remove trailing slash logging (revert #2743)
1 parent e27a73b commit 5e0e71b
Copy full SHA for 5e0e71b

File tree

Expand file treeCollapse file tree

2 files changed

+2
-10
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-10
lines changed

‎src/run/handlers/server.ts

Copy file name to clipboardExpand all lines: src/run/handlers/server.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export default async (
131131
})
132132
}
133133

134-
setCacheControlHeaders(response, request, requestContext, nextConfig)
134+
setCacheControlHeaders(response, request, requestContext)
135135
setCacheTagsHeaders(response.headers, requestContext)
136136
setVaryHeaders(response.headers, request, nextConfig)
137137
setCacheStatusHeader(response.headers, nextCache)

‎src/run/headers.ts

Copy file name to clipboardExpand all lines: src/run/headers.ts
+1-9Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { NextConfigComplete } from 'next/dist/server/config-shared.js'
33

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

6-
import { getLogger, RequestContext } from './handlers/request-context.cjs'
6+
import { RequestContext } from './handlers/request-context.cjs'
77
import { recordWarning } from './handlers/tracer.cjs'
88
import { getMemoizedKeyValueStoreBackedByRegionalBlobStore } from './storage/storage.cjs'
99

@@ -200,7 +200,6 @@ export const setCacheControlHeaders = (
200200
{ headers, status }: Response,
201201
request: Request,
202202
requestContext: RequestContext,
203-
nextConfig: NextConfigComplete,
204203
) => {
205204
if (
206205
typeof requestContext.routeHandlerRevalidate !== 'undefined' &&
@@ -213,13 +212,6 @@ export const setCacheControlHeaders = (
213212
return
214213
}
215214

216-
// temporary diagnostic to evaluate number of trailing slash redirects
217-
if (status === 308 && request.url.endsWith('/') !== nextConfig.trailingSlash) {
218-
getLogger()
219-
.withFields({ trailingSlash: nextConfig.trailingSlash, location: headers.get('location') })
220-
.log('NetlifyHeadersHandler.trailingSlashRedirect')
221-
}
222-
223215
const cacheControl = headers.get('cache-control')
224216
if (status === 404) {
225217
if (request.url.endsWith('.php')) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.