Skip to content

Enable the mod_headers module #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

wulff
Copy link
Contributor

@wulff wulff commented Jul 22, 2024

This change makes it possible to add CORS and other headers to HTTP responses.

This is necessary if we want to use static assets like fonts and icons in single directory components rendered in Storybook using the new Storybook contrib module.

Add the following directives to the .htaccess-file in your web root to set the required header:

<FilesMatch "\.(eot|gif|ico|jpeg|jpg|otf|png|svg|ttf|woff|woff2)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
  </IfModule>
</FilesMatch>

This change makes it possible to add CORS and other headers to HTTP responses.

This is necessary if we want to use static assets like fonts and icons
in single directory components rendered in Storybook using the new
Storybook contrib module.

Add the following directives to the `.htaccess`-file in your web root to
set the required header:

```
<FilesMatch "\.(eot|gif|ico|jpeg|jpg|otf|png|svg|ttf|woff|woff2)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
  </IfModule>
</FilesMatch>
```
@wulff
Copy link
Contributor Author

wulff commented Jul 22, 2024

Copy link
Member

@arnested arnested left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@arnested arnested merged commit 3df8c82 into reload:main Jul 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants