Closed Arshiash80 closed 1 year ago
Hi @Arshiash80 ππ» I'm investigating your issue. Are you using App or Page Router?
Thanks a lot @mkubdev
Thank you for your response @mkubdevπ
I'm pleased to inform you that I've successfully resolved the issue by updating the security headers in the next.config.js
file.
// config
const nextConfig = {
...,
async headers() {
return [
{
// Apply these headers to all routes in your application.
source: '/:path*',
headers: securityHeaders,
},
];
},
...
}
// Security header
const securityHeaders = [
{
key: 'Content-Security-Policy',
value: ContentSecurityPolicy.replace(/\s{2,}/g, ' ').trim(),
},
...
];
const ContentSecurityPolicy = `
...
default-src img-src 'self' blob: data: ...
img-src 'self' blob: data: ...
...
`
The problem occurred because of a generated blob, and Next.js needed to be informed that it's okay to load an image from a URL starting with "blob:..."
What are you trying to do?
I can't get it to work in Next.js. Please help!
Code
Sandbox Link
No response
Library Version
"next": "^13.4.12", "react-photo-sphere-viewer": "^3.4.0-psv5.4.0"
What operating system are you using?
macOS
What browser are you using?
Firefox
Logs