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

Allow opting in/out of Link preload headers when calling stylesheet_link_tag or javascript_include_tag #48553

Merged

Conversation

ghiculescu
Copy link
Member

@ghiculescu ghiculescu commented Jun 22, 2023

Fixes #48517

# will exclude header, even if config is enabled:
javascript_include_tag("http://example.com/all.js", preload_links_header: false)

# will include header, even if config is disabled:
stylesheet_link_tag("http://example.com/all.css", preload_links_header: true)

@rails-bot rails-bot bot added the actionview label Jun 22, 2023
…t_link_tag` or `javascript_include_tag`

Fixes rails#48517

```ruby
javascript_include_tag("http://example.com/all.js", preload_links_header: false)

stylesheet_link_tag("http://example.com/all.js", preload_links_header: true)
```
@ghiculescu ghiculescu force-pushed the preload_links_header-invocation branch from 3dd4f4f to 5b116c5 Compare June 22, 2023 02:15
@guilleiguaran guilleiguaran merged commit 8a158ed into rails:main Jun 30, 2023
9 checks passed
@ghiculescu ghiculescu deleted the preload_links_header-invocation branch June 30, 2023 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

javascript_include_tag's implicit modulepreload Link header insertion breaks importmaps
2 participants