mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 23:55:20 +00:00
checking csp nonce
This commit is contained in:
@@ -64,7 +64,6 @@ export const SearchResults = React.forwardRef(function SearchResults(
|
||||
const timeoutRef = React.useRef<Timer | null>(null);
|
||||
|
||||
const fetchResults = React.useCallback(async () => {
|
||||
console.log('fetchResults is called', { query, global, pointer, revisionId });
|
||||
setResultsState((prev) => ({ results: prev.results, fetching: true }));
|
||||
|
||||
const results = await (global
|
||||
|
||||
@@ -10,6 +10,7 @@ import { filterOutNullable } from './typescript';
|
||||
export async function getContentSecurityPolicyNonce(): Promise<string> {
|
||||
const headersList = await headers();
|
||||
const nonce = headersList.get('x-nonce');
|
||||
console.log('CSP Nonce called', { headers, nonce });
|
||||
if (!nonce) {
|
||||
throw new Error('No nonce found in headers');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user