Skip to content

Commit e70fee5

Browse files
authored
add sentry profiling header for document response (#789)
1 parent 30a4a3a commit e70fee5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/entry.server.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ export default async function handleRequest(...args: DocRequestArgs) {
3636
responseHeaders.set('fly-primary-instance', primaryInstance)
3737
responseHeaders.set('fly-instance', currentInstance)
3838

39+
if (process.env.NODE_ENV === 'production' && process.env.SENTRY_DSN) {
40+
responseHeaders.append('Document-Policy', 'js-profiling')
41+
}
42+
3943
const callbackName = isbot(request.headers.get('user-agent'))
4044
? 'onAllReady'
4145
: 'onShellReady'

0 commit comments

Comments
 (0)