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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Accept header to requests in NetworkLoader #261

Merged
merged 1 commit into from Oct 16, 2022

Conversation

ElMassimo
Copy link
Contributor

Description 馃摉

This pull request adds the Accept headers to requests made by the NetworkLoader strategy.

This allows development servers which can serve different file types鈥攕uch as Vite.js鈥攖o serve a CSS file as expected.

This change should be backwards-compatible as any server that was previously responding with CSS content should continue to do so.

Background 馃摐

Vite.js can serve JS content for a given CSS file path, which allows it to provide hot-refresh for stylesheets.

For more information, see ElMassimo/vite_ruby#93 (comment)

This allows development servers to serve the correct file type.

For more information see ElMassimo/vite_ruby#93 (comment)
@Intrepidd
Copy link
Contributor

I was about to open it, thanks !

@fphilipe fphilipe merged commit d221928 into fphilipe:main Oct 16, 2022
@fphilipe
Copy link
Owner

Makes sense! Thanks for the PR.

@ElMassimo ElMassimo deleted the mime branch October 17, 2022 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants