kemal-defense-example
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
Repository
kemal-defense-example
Owner
Statistic
- 1
- 0
- 0
- 0
- 2
- over 5 years ago
- May 25, 2019
License
MIT License
Links
Synced at
Thu, 21 Nov 2024 11:13:25 GMT
Languages