2

I'm working with CloudFlare and have identified a script that needs the data-cfasync=“false” attribute applied so CF doesn't touch it.

This script is defined in a library in a custom module.

my-custom-library:
  version: 1.x
  header: true
  js:
    //path/to/external/library.js: { type: external, weight: -400, attributes: { data-cfasync: "false" } }

I can get the attribute on the script tag in question but it's always after the src. Per the CloudFlare requirements it needs to go before src.

How can I can move this attribute to where it needs to go?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.