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

Add subdomain support #318

Merged
merged 4 commits into from
Sep 24, 2024
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
13 changes: 13 additions & 0 deletions src/resources/config/shopify-app.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@

'manual_migrations' => (bool) env('SHOPIFY_MANUAL_MIGRATIONS', false),

/*
|--------------------------------------------------------------------------
| Sub Domain
|--------------------------------------------------------------------------
|
| This is the subdomain where Shopify will be accessible from. If the
| setting is null, Shopify will reside under the same domain as the
| application. Otherwise, this value will be used as the subdomain.
|
*/

'domain' => env('SHOPIFY_DOMAIN'),

/*
|--------------------------------------------------------------------------
| Manual routes
Expand Down
5 changes: 4 additions & 1 deletion src/resources/routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
$manualRoutes = explode(',', $manualRoutes);
}

Route::group(['middleware' => ['api']], function () use ($manualRoutes) {
Route::group([
'domain' => Util::getShopifyConfig('domain'),
'middleware' => ['api']
], function () use ($manualRoutes) {
/*
|--------------------------------------------------------------------------
| API Routes
Expand Down
6 changes: 5 additions & 1 deletion src/resources/routes/shopify.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
$manualRoutes = explode(',', $manualRoutes);
}

Route::group(['prefix' => Util::getShopifyConfig('prefix'), 'middleware' => ['web']], function () use ($manualRoutes) {
Route::group([
'domain' => Util::getShopifyConfig('domain'),
'prefix' => Util::getShopifyConfig('prefix'),
'middleware' => ['web']
], function () use ($manualRoutes) {
/*
|--------------------------------------------------------------------------
| Home Route
Expand Down
Loading