GitXplorerGitXplorer
O

domain-enforcement

public
23 stars
5 forks
0 issues

Commits

List of commits on branch master.
Unverified
02824fa71b7dce6aa9d55ed11e3e605b00a89937

added laravel 5.5 auto discoverty compatibility

committed 8 years ago
Unverified
4b3a3d028c377464c6e34f2c98d9ac9e5f777677

updated comment

OOwenMelbz committed 8 years ago
Unverified
5a16fb4b3623a49f13127bab0e65699745e28801

Merge pull request #1 from lloy0076/patch-2

OOwenMelbz committed 8 years ago
Unverified
2a95e7457cc95585ef21b1651e4ef86189f0665a

Fix documentation.

llloy0076 committed 8 years ago
Unverified
8b1787b0e0523b611e549aa5814abc83c3666ef1

removed unused files

committed 8 years ago
Unverified
82fa56158f39c788edd66872b2da7ced8b8f77ea

Updated readme and added redirection logic

committed 8 years ago

README

The README file for this repository.

Laravel 5+ Domain / APP_URL Enforcement

An automatic piece of middleware for Laravel 5+, which will force users to access your application via what is defined in the APP_URL - especially useful for SEO forcing non-www users to www etc, unless specified in the ignore list

Usage

  1. Install via composer composer require owenmelbz/domain-enforcement

  2. Register the service provider - typically done inside the app.php providers array e.g OwenMelbz\DomainEnforcement\DomainEnforcementServiceProvider::class

  3. Add ENFORCE_DOMAIN=true to your application environment config e.g .env

  4. Enjoy your stress free architecture agnostic redirects

Configuration

If you publish the config via php artisan vendor:publish --provider="OwenMelbz\DomainEnforcement\DomainEnforcementServiceProvider" you can exclude urls from getting enforced.

Why?

Too often we've wasted time configuring redirections, with proxy systems like CloudFlare, with apache development machines and nginx production, this removes all the headache and can simply be turned off and on at a whim.