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

Rewrite domain restrictions #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ $ php artisan vendor:publish
## Config
After running `vendor:publish`, a config file called `sudosu.php` should appear in your project. Within here, there are two configuration values:

**sudosu.allowed_tlds `array`**
**sudosu.domains `array`**

By default, the package will disable itself on any domains that don't have a TLD of `.dev` or `.local`. This is a security measure to reduce the risk of accidentally enabling the package in production. If you have a different TLD in development, you can edit the config option `sudosu.allowed_tlds`.
Here you can specify the domains that the package should be active on. By default it contains the TLD's defined in https://tools.ietf.org/html/rfc2606. This is a security measure to reduce the risk of accidentally enabling the package in production. If you have a different domain in development, you can edit the config option `sudosu.domains`.

**sudosu.user_model `string`**

Expand All @@ -59,6 +59,6 @@ The path to the application User model. This will be used to retrieve the users
## Disclaimer - DANGER!
This package can pose a serious security issue if used incorrectly, as anybody will be able to take control of any user's account. Please ensure that the service provider is only registered when the app is in a debug/local environment.

By default, the package will disable itself on any domains that don't have a TLD of `.dev` or `.local`. This is a security measure to reduce the risk of accidentally enabling the package in production. If you have a different TLD in development, you can edit the config option `sudosu.allowed_tlds`.
By default, the package will disable itself on any domains that don't have a TLD of `.localhost`, `.test` or `.example`. This is a security measure to reduce the risk of accidentally enabling the package in production. If you have a different domain in development, you can edit the config option `sudosu.domains`.

By using this package, you agree that VIA Creative and the contributors of this package cannot be held responsible for any damages caused by using this package.
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@
}
],
"require": {
"php": ">=7.0"
"php": ">=7.0",
"illuminate/support": "^5.4"
},
"require-dev": {
"mockery/mockery": "^0.9.9",
"phpunit/phpunit": "^6.0"
},
"autoload": {
"psr-4": {
"VIACreative\\SudoSu\\": "src/"
}
}
}
}
Loading