Awesome
kemal-defense-example
Example of the defense use with Kemal.
Running
-
git clone git@github.com:defense-cr/kemal-defense-example.git
-
cd kemal-defense-example
-
shards install
-
crystal src/app.cr
Testing with curl
- Authorized request
curl -i -X GET http://0.0.0.0:3000/?q=my-search
HTTP/1.1 200 OK
Connection: keep-alive
X-Powered-By: Kemal
Content-Type: text/html
Content-Length: 12
Hello Kemal!%
- Forbidden request
curl -i -X GET http://0.0.0.0:3000/?q=BLOCK
HTTP/1.1 403 Forbidden
Connection: keep-alive
X-Powered-By: Kemal
Content-Type: text/plain
Content-Length: 10
Forbidden
Contributing
- Fork it (https://github.com/defense-cr/kemal-defense-example/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Rodrigo Pinto - creator and maintainer