motikan2010 / gpt-waf
v1.1.1
2023-05-05 11:57 UTC
Requires
- php: >=8.0
Requires (Dev)
- orchestra/testbench: 4.*
- phpunit/phpunit: ^9.4
This package is auto-updated.
Last update: 2024-12-05 15:09:47 UTC
README
This is a WAF (Web Application Firewall) using GPT-4. (Laravel only)
Requirement : OpenAI API key for GPT-4.
Install
composer require motikan2010/gpt-waf
Performance
Detect
Speed
Using
Edit routing & ".env" file
Set "gpt-waf
" as the middleware for routing.
Route::group(['middleware' => 'gpt-waf'], function () { // Protect area });
The following changes will be enabled.
https://github.com/motikan2010/GPT-WAF-Test-App/commit/5a021e632488a585fc17d6360e2a89cd99a00eb6
Setting of ".env"
Required
ex.
GPT_WAF_ENABLED=true
GPT_WAF_OPEN_AI_API_KEY=st-tGC**********
Option
ex.
GPT_WAF_BLOCK_STATUS_CODE=403
GPT_WAF_DEBUG_MODE=true
GPT_WAF_SYSTEM_ROLE=
GPT_WAF_QUESTION_TEXT=