Active
Project:
Storybook
Version:
1.0.2
Component:
Storybook
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jun 2025 at 15:17 UTC
Updated:
7 Feb 2026 at 10:19 UTC
Jump to comment: Most recent
When running Storybook locally (http://localhost:6006), CORS policy errors occur for both .woff and .woff2 font files, even though the recommended cors.config has been added as described on the module's homepage.
Error message example:
Access to font at '<font-path>.woff2' from origin 'http://localhost:6006' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
These CORS errors do not appear when accessing the same fonts on the Drupal site itself.
Comments
Comment #2
marcus.w commentedDid you find a fix for this, I'm seeing the same issue?
Comment #3
sanduhrsApparently storybook can't return the fonts, unless you declare a static assets folder containing the files.
https://storybook.js.org/docs/configure/integration/images-and-assets
Comment #4
marcus.w commentedTurned out to be an nginx issue and I'm using valet rather than ddev. This is what got it working