next-safe-middleware icon indicating copy to clipboard operation
next-safe-middleware copied to clipboard

Problems appending directives

Open CarstenHoyer opened this issue 2 years ago • 0 comments

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?

CarstenHoyer avatar Dec 04 '22 21:12 CarstenHoyer