mirror of
https://github.com/documenso/documenso.git
synced 2026-10-03 10:13:52 +10:00
9 lines
287 B
TypeScript
9 lines
287 B
TypeScript
import type { MiddlewareFunction } from 'react-router';
|
|
|
|
import { getRequestNonce } from '../../server/load-context';
|
|
import { nonceContext } from '../utils/nonce';
|
|
|
|
export const nonceMiddleware: MiddlewareFunction = ({ context }) => {
|
|
context.set(nonceContext, getRequestNonce());
|
|
};
|