Skip to content

Update vite_preload_tag to emit one early hint per entrypoint#402

Merged
ElMassimo merged 4 commits intoElMassimo:mainfrom
PikachuEXE:fix/too-many-early-hints
Sep 22, 2023
Merged

Update vite_preload_tag to emit one early hint per entrypoint#402
ElMassimo merged 4 commits intoElMassimo:mainfrom
PikachuEXE:fix/too-many-early-hints

Conversation

@PikachuEXE
Copy link
Copy Markdown
Contributor

Description 📖

Update vite_preload_tag to emit one early hint per entrypoint
Avoids error like "too many 1xx informational responses"

Background 📜

I am trying this gem with caddy as reverse proxy
And visiting the deployed website returns 502, log shows "too many 1xx informational responses"
I found this issue is reported caddyserver/caddy#5616
Which is caused by having too many 103 responses sent

The Fix 🔨

Update vite_preload_tag to emit one early hint per entrypoint (actually all sources input, but it's mainly used by vite_javascript_tag)

Screenshots 📷

N/A

Avoids error like "too many 1xx informational responses"
Comment thread vite_rails/lib/vite_rails/tag_helpers.rb Outdated
@ElMassimo ElMassimo added the enhancement New feature or request label Sep 21, 2023
Co-authored-by: Máximo Mussini <maximomussini@gmail.com>
Copy link
Copy Markdown
Contributor Author

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

Rubocop

Comment thread vite_rails/lib/vite_rails/tag_helpers.rb Outdated
Comment thread vite_rails/lib/vite_rails/tag_helpers.rb Outdated
@ElMassimo
Copy link
Copy Markdown
Owner

Looks good, thanks Pikachu! 😃

@ElMassimo ElMassimo merged commit 3f9a60b into ElMassimo:main Sep 22, 2023
@PikachuEXE PikachuEXE deleted the fix/too-many-early-hints branch October 3, 2023 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants