Skip to content

Commit 9542548

Browse files
waleedlatifwaleedlatif
authored andcommitted
cleanup
1 parent f7c7538 commit 9542548

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

apps/sim/contexts/socket-context.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ export function SocketProvider({ children, user }: SocketProviderProps) {
445445
})
446446

447447
socketInstance.on('workflow-state', (workflowData) => {
448-
logger.info('Received workflow state from server:', workflowData)
448+
logger.info('Received workflow state from server')
449449

450450
// Update local stores with the fresh workflow state (same logic as YAML editor)
451451
if (workflowData?.state && workflowData.id === urlWorkflowId) {

apps/sim/lib/security/csp.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import crypto from 'crypto'
21
import { env, getEnv } from '../env'
32

43
/**
@@ -152,27 +151,6 @@ export function getMainCSPPolicy(): string {
152151
return buildCSPString(buildTimeCSPDirectives)
153152
}
154153

155-
/**
156-
* Generate a cryptographically secure nonce for CSP
157-
*/
158-
export function generateNonce(): string {
159-
return Buffer.from(crypto.randomUUID()).toString('base64')
160-
}
161-
162-
/**
163-
* Get the current request's nonce from headers (for use in app components)
164-
*/
165-
export function getNonce(): string | null {
166-
try {
167-
// This requires dynamic imports to avoid edge runtime issues
168-
const { headers } = require('next/headers')
169-
const headersList = headers()
170-
return headersList.get('x-nonce')
171-
} catch {
172-
return null
173-
}
174-
}
175-
176154
/**
177155
* Permissive CSP for workflow execution endpoints
178156
*/

0 commit comments

Comments
 (0)