Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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!
```