Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/katsew/checkpoint-php
Create whitelist and blacklist for the url route.
https://github.com/katsew/checkpoint-php
Last synced: 14 days ago
JSON representation
Create whitelist and blacklist for the url route.
- Host: GitHub
- URL: https://github.com/katsew/checkpoint-php
- Owner: katsew
- Created: 2016-12-14T03:57:00.000Z (about 8 years ago)
- Default Branch: develop
- Last Pushed: 2016-12-14T06:14:18.000Z (about 8 years ago)
- Last Synced: 2024-11-18T09:46:10.680Z (3 months ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Checkpoint
This is a module that create both whitelist and blacklist for url.
# Usage
```
$checkpoint = new Checkpoint();
$checkpoint->setSafeBorders(['/path/which/always/pass/through']);
$checkpoint->setCheckpoints(['/path/which/not/pass/through', '/blacklisted']);$can_pass_through = $checkpoint->canPassThrough('/hoge'); // will return true.
$can_pass_through = $checkpoint->canPassThrough('/blacklisted'); // will return false!
```