Skip to content
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

"jekyll serve" CORS issue on some asset files #8889

Closed
reinhart1010 opened this issue Nov 22, 2021 · 7 comments
Closed

"jekyll serve" CORS issue on some asset files #8889

reinhart1010 opened this issue Nov 22, 2021 · 7 comments
Labels
frozen-due-to-age stale Nobody stepped up to work on this issue.

Comments

@reinhart1010
Copy link

Hello, I'm the creator of HAM, a very new Jekyll-based framework for creating static wiki sites. As of version 0.1.3 I have decided to include all external JS and CSS dependencies (e.g. Bootstrap Icons) into the /assets directory.

When serving with jekyll serve on Linux, some (local) asset files are not loaded in Google Chrome, and it seems to simply say "CORS Error". However, when serving the site with PHP and Python's development HTTP servers (php -S 127.0.0.1:4000 and python -m http.server 4000) over the generated /_site directory, these files are loaded properly.

Is this something related to Webrick's default configuration, and are there any solutions for this? I've also seen a feature request to allow modifying development server headers (#8785) and the issue doesn't seem to be resolved yet.

See also: reinhart1010/HAM#2

@ashmaroli

This comment has been minimized.

@reinhart1010

This comment has been minimized.

@ashmaroli

This comment has been minimized.

@reinhart1010

This comment has been minimized.

@ashmaroli

This comment has been minimized.

@mulingLHY
Copy link

I had the same problem when I used simple-jekyll-search. I found that the reason is that when I run "jekyll s", the site.url should be "127.0.0.1:4000"(defined in _config.yml), but it is automatically replaced with "localhost:4000", so it causes " CORS Error".
Using http://localhost:4000/name instead of http://127.0.0.1:4000/name for local debugging can avoid this problem.

@jekyllbot jekyllbot added the stale Nobody stepped up to work on this issue. label Feb 21, 2022
@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the latest 3.x-stable or master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyll jekyll locked and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age stale Nobody stepped up to work on this issue.
Projects
None yet
Development

No branches or pull requests

4 participants