Skip to content

Commit 2b29567

Browse files
authored
fix: support proxies in front of Netlify (#101)
1 parent 134bac8 commit 2b29567

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/api/inspect-url.post.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ export default defineEventHandler(async (event) => {
4141
})
4242
const durationInMs = Date.now() - startTime
4343

44-
// TODO(serhalp) What about sites with an extra proxy on top? Maybe check for a debug response
45-
// header instead?
46-
if (headers.get('Server') !== 'Netlify') {
44+
if (!headers.has('X-NF-Request-Id')) {
4745
throw createError({
4846
statusCode: 400,
4947
message: 'This tool can only be used with Netlify sites',

0 commit comments

Comments
 (0)