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

Option for adding additional files #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ste101
Copy link
Contributor

@ste101 ste101 commented May 17, 2021

This patch works for me.
I think it could be done better.

Files can be added like this:

plugin.tx_http2 {
    settings {
        before {
            fontRegular.file = EXT:user_pizpalue/Resources/Public/Fonts/source-sans-pro-v14-latin-regular.woff2
            fontRegular.type = font
            fontRegular.mime = font/woff2
            fontRegular.crossorigin = anonymous
        }
        after {
            fontAwesome.file = EXT:user_pizpalue/Resources/Public/Fonts/fa-solid-900.woff2
            fontAwesome.type = font
            fontAwesome.mime = font/woff2
            fontAwesome.crossorigin = anonymous
            fontAwesome.rel = prefetch
        }
    }
}

With a little more other preload option could be added:
https://3perf.com/blog/link-rels/

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.

1 participant