I am using Laravel Vapor to build a Shopify app. As the Shopify App requires some javascript files included to the user's store I am Shopify's scripttag functionality to provide URLs of assets to get included. I am experiencing the following issue. Laravel Vapor by default makes the static resources available through the public S3 "asset" bucket or the AWS CloudFront CDN network. I need those assets to be available from the domain root. Vapor has the possibility to onclude assets which are accessible from the root domain, but in my case this doesn`t to the job. With the following configuration I am trying to allow the mentioned asset to be loaded from the domain root.
'serve_assets' => [
'scripttags/onload.js'
],
The problem the way Shopify injects those assets is with get parameter like {assetUrl}?shop=usersstore.myshopify.com. I need a way to allow wildcard asset addresses to be served by the root domain. Something I tried and it doesn' work is:
'serve_assets' => [
'scripttags/onload.js*'
],
If you need more information or have questions ask in the comments. Thank you for the time and hope to find an answer soon.