fix: Disable crossOriginResourcePolicy in helmet to allow image loading
- Images exist on server but helmet was blocking cross-origin access - Disable crossOriginResourcePolicy to allow images to load from https://litter-api.psbailey.uk - Frontend at https://litterscouts.psbailey.uk can now load images from API domain
This commit is contained in:
@@ -19,8 +19,8 @@ const PORT = process.env.PORT || 3005;
|
||||
|
||||
// Middleware
|
||||
app.use(helmet({
|
||||
crossOriginResourcePolicy: { policy: "cross-origin" },
|
||||
contentSecurityPolicy: false, // Disable CSP for development
|
||||
crossOriginResourcePolicy: false, // Disable to allow images to be loaded from different origin
|
||||
contentSecurityPolicy: false,
|
||||
}));
|
||||
app.use(cors({
|
||||
origin: [
|
||||
|
||||
Reference in New Issue
Block a user