next-safe-middleware
next-safe-middleware copied to clipboard
Problems appending directives
Hi, I have the following:
const securityMiddleware = [
nextSafe({
isDev,
contentSecurityPolicy: {
"connect-src": ["https://*.segment.com/"],
},
}),
strictDynamic({}),
];
export default chainMatch(isPageRequest)(...securityMiddleware);
But segment.com is not being appended to the connect-src directives. I have also tried with disableCsp and using the cap middleware, but then I run into other issues (I need to build the whole directive myself).
What Am I doing wrong?