Closed danfsd closed 11 months ago
Hmm, I've renamed the cspMiddleware.ts
to middleware.ts
and placed it on the root of the application and it worked.
Does the naming/location of the middleware file interferes with the functioning of the library?
@danfsd, this is a next.js convention. The file has to be named middleware.ts
Thanks @dannyrb, I wasn't aware of that!
This is the first time I'm trying to use this library and I'm finding it difficult to see the CSP directives that I've configured on the middleware to show on the CSP HTTP header.
These are the directives defined on
cspMiddleware.js
:When running on production, the
content-security-policy
header remains empty:All the other files have been setup following the Getting Started part of the docs.
Any ideas?