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

Allow for restricted domains #50

Merged
merged 5 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions config/filament.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
| The default is `admin` but you can change it to whatever works best and
| doesn't conflict with the routing in your application.
|
| You may also change the domain where Filament should be active. If the
| domain is empty, all domains will be valid.
|
*/

'path' => 'admin',

'domain' => '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add a comment above the config option, like the path one above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think it might make sense to allow using an env() here too, that way you could change the domain based on staging, production, local, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryangjchandler yes I agree, I updated my PR


/*
|--------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function map()
VerifyCsrfToken::class,
SubstituteBindings::class,
])
->domain(config('filament.domain'))
->prefix(config('filament.path'))
->group(__DIR__ . '/../../routes/web.php');
}
Expand Down