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

Support | Allow the updating of the root url used for the CDN #176

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/resources/config/shopify-app.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@
*/

'route_names' => [
'home' => env('SHOPIFY_ROUTE_NAME_HOME', 'home'),
'authenticate' => env('SHOPIFY_ROUTE_NAME_AUTHENTICATE', 'authenticate'),
'authenticate.token' => env('SHOPIFY_ROUTE_NAME_AUTHENTICATE_TOKEN', 'authenticate.token'),
'billing' => env('SHOPIFY_ROUTE_NAME_BILLING', 'billing'),
'billing.process' => env('SHOPIFY_ROUTE_NAME_BILLING_PROCESS', 'billing.process'),
'home' => env('SHOPIFY_ROUTE_NAME_HOME', 'home'),
'authenticate' => env('SHOPIFY_ROUTE_NAME_AUTHENTICATE', 'authenticate'),
'authenticate.token' => env('SHOPIFY_ROUTE_NAME_AUTHENTICATE_TOKEN', 'authenticate.token'),
'billing' => env('SHOPIFY_ROUTE_NAME_BILLING', 'billing'),
'billing.process' => env('SHOPIFY_ROUTE_NAME_BILLING_PROCESS', 'billing.process'),
'billing.usage_charge' => env('SHOPIFY_ROUTE_NAME_BILLING_USAGE_CHARGE', 'billing.usage_charge'),
'webhook' => env('SHOPIFY_ROUTE_NAME_WEBHOOK', 'webhook'),
'webhook' => env('SHOPIFY_ROUTE_NAME_WEBHOOK', 'webhook'),
],

/*
Expand Down Expand Up @@ -141,6 +141,10 @@
// Leaving empty will use the latest version - not recommended in production.
'appbridge_version' => env('SHOPIFY_APPBRIDGE_VERSION', 'latest'),

// Set a new CDN URL if you want to host the AppBridge JS yourself or unpkg goes down.
// DO NOT include a trailing slash.
'appbridge_cdn_url' => env('SHOPIFY_APPBRIDGE_CDN_URL', 'https://unpkg.com'),

/*
|--------------------------------------------------------------------------
| Shopify App Name
Expand Down Expand Up @@ -410,8 +414,8 @@
*/

'job_queues' => [
'webhooks' => env('WEBHOOKS_JOB_QUEUE', null),
'scripttags' => env('SCRIPTTAGS_JOB_QUEUE', null),
'webhooks' => env('WEBHOOKS_JOB_QUEUE', null),
'scripttags' => env('SCRIPTTAGS_JOB_QUEUE', null),
'after_authenticate' => env('AFTER_AUTHENTICATE_JOB_QUEUE', null),
],

Expand Down
4 changes: 2 additions & 2 deletions src/resources/views/layouts/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</div>

@if(\Osiset\ShopifyApp\Util::getShopifyConfig('appbridge_enabled') && \Osiset\ShopifyApp\Util::useNativeAppBridge())
<script src="https://unpkg.com/@shopify/app-bridge{{ \Osiset\ShopifyApp\Util::getShopifyConfig('appbridge_version') ? '@'.config('shopify-app.appbridge_version') : '' }}"></script>
<script src="https://unpkg.com/@shopify/app-bridge-utils{{ \Osiset\ShopifyApp\Util::getShopifyConfig('appbridge_version') ? '@'.config('shopify-app.appbridge_version') : '' }}"></script>
<script src="{{config('shopify-app.appbridge_cdn_url')}}/@shopify/app-bridge{{ \Osiset\ShopifyApp\Util::getShopifyConfig('appbridge_version') ? '@'.config('shopify-app.appbridge_version') : '' }}"></script>
<script src="{{config('shopify-app.appbridge_cdn_url')}}/@shopify/app-bridge-utils{{ \Osiset\ShopifyApp\Util::getShopifyConfig('appbridge_version') ? '@'.config('shopify-app.appbridge_version') : '' }}"></script>
<script
@if(\Osiset\ShopifyApp\Util::getShopifyConfig('turbo_enabled'))
data-turbolinks-eval="false"
Expand Down