mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Moar
This commit is contained in:
parent
00266ed8e5
commit
3c74d4c3fd
1 changed files with 138 additions and 144 deletions
24
CHANGELOG.md
24
CHANGELOG.md
|
@ -20,7 +20,7 @@
|
||||||
- Closes response by default in `HTTP::Server::Context#redirect` [#641](https://github.com/kemalcr/kemal/pull/641). Thanks @cyangle :pray:
|
- Closes response by default in `HTTP::Server::Context#redirect` [#641](https://github.com/kemalcr/kemal/pull/641). Thanks @cyangle :pray:
|
||||||
- Enable option for `index.html` to be a directories default [#640](https://github.com/kemalcr/kemal/pull/640). Thanks @ukd1 :pray:
|
- Enable option for `index.html` to be a directories default [#640](https://github.com/kemalcr/kemal/pull/640). Thanks @ukd1 :pray:
|
||||||
|
|
||||||
You can enable it via
|
You can enable it via:
|
||||||
|
|
||||||
```crystal
|
```crystal
|
||||||
serve_static({"dir_index" => true})
|
serve_static({"dir_index" => true})
|
||||||
|
@ -112,7 +112,7 @@ To test
|
||||||
|
|
||||||
# 0.24.0 (14-08-2018)
|
# 0.24.0 (14-08-2018)
|
||||||
|
|
||||||
- *[breaking change]* Removed `env.params.files`. You can use Crystal's built-in `HTTP::FormData.parse` instead
|
- *[breaking change]* Removed `env.params.files`. You can use Crystal's built-in `HTTP::FormData.parse` instead:
|
||||||
|
|
||||||
```crystal
|
```crystal
|
||||||
post "/upload" do |env|
|
post "/upload" do |env|
|
||||||
|
@ -228,7 +228,7 @@ end
|
||||||
add_context_storage_type(User)
|
add_context_storage_type(User)
|
||||||
```
|
```
|
||||||
|
|
||||||
- Prevent `send_file returning filesize. (thanks @crisward)
|
- Prevent `send_file` returning filesize. (thanks @crisward)
|
||||||
- Don't call setup in `config#add_filter_handler` fixes [#338](https://github.com/kemalcr/kemal/issues/338).
|
- Don't call setup in `config#add_filter_handler` fixes [#338](https://github.com/kemalcr/kemal/issues/338).
|
||||||
|
|
||||||
# 0.18.3 (07-03-2017)
|
# 0.18.3 (07-03-2017)
|
||||||
|
@ -255,9 +255,7 @@ add_context_storage_type(User)
|
||||||
|
|
||||||
# 0.18.0 (11-02-2017)
|
# 0.18.0 (11-02-2017)
|
||||||
|
|
||||||
- Simpler file upload. File uploads can now be access from `HTTP::Server::Context` like `env.params.files["filename"]`.
|
- Simpler file upload. File uploads can now be access from `HTTP::Server::Context` like `env.params.files["filename"]`, which exposes following properties.
|
||||||
|
|
||||||
`env.params.files["filename"]` has 5 methods:
|
|
||||||
+ `tmpfile`: This is temporary file for file upload. Useful for saving the upload file.
|
+ `tmpfile`: This is temporary file for file upload. Useful for saving the upload file.
|
||||||
+ `tmpfile_path`: File path of `tmpfile`.
|
+ `tmpfile_path`: File path of `tmpfile`.
|
||||||
+ `filename`: File name of the file upload. (logo.png, images.zip e.g)
|
+ `filename`: File name of the file upload. (logo.png, images.zip e.g)
|
||||||
|
@ -315,11 +313,7 @@ To test
|
||||||
|
|
||||||
Now all requests will first go through the Middleware stack then Filters (`before_*`) and will finally reach the matching route.
|
Now all requests will first go through the Middleware stack then Filters (`before_*`) and will finally reach the matching route.
|
||||||
|
|
||||||
Which is illustrated as,
|
Which is illustrated as: `Request -> Middleware -> Filter -> Route`
|
||||||
|
|
||||||
```
|
|
||||||
Request -> Middleware -> Filter -> Route
|
|
||||||
```
|
|
||||||
|
|
||||||
- Rename `return_with` as `halt`.
|
- Rename `return_with` as `halt`.
|
||||||
- Route declaration must start with `/`. Fixes [#242](https://github.com/kemalcr/kemal/issues/242)
|
- Route declaration must start with `/`. Fixes [#242](https://github.com/kemalcr/kemal/issues/242)
|
||||||
|
@ -354,7 +348,7 @@ end
|
||||||
|
|
||||||
- Close response on `halt`. (thanks @samueleaton).
|
- Close response on `halt`. (thanks @samueleaton).
|
||||||
- Update Radix to `v0.3.4`.
|
- Update Radix to `v0.3.4`.
|
||||||
- `error` handler now also yields error. For example you can get the error mesasage like
|
- `error` handler now also yields error. For example you can get the error mesasage like:
|
||||||
|
|
||||||
```crystal
|
```crystal
|
||||||
error 500 do |env, err|
|
error 500 do |env, err|
|
||||||
|
@ -412,11 +406,11 @@ Kemal.config.session["expire_time"] = 48.hours
|
||||||
|
|
||||||
# 0.15.0 (03-09-2016)
|
# 0.15.0 (03-09-2016)
|
||||||
|
|
||||||
- Add context store
|
- Add context store.
|
||||||
- `KEMAL_ENV` respects to `Kemal.config.env` and needs to be explicitly set.
|
- `KEMAL_ENV` respects to `Kemal.config.env` and needs to be explicitly set.
|
||||||
- `Kemal::InitHandler` is introduced. Adds initial configuration, headers like `X-Powered-By`.
|
- `Kemal::InitHandler` is introduced. Adds initial configuration, headers like `X-Powered-By`.
|
||||||
- Add `send_file` to helpers.
|
- Add `send_file` to helpers.
|
||||||
- Add mime types.
|
- Add mime types.
|
||||||
- Fix parsing JSON params when "charset" is present in `Content-Type` header.
|
- Fix parsing JSON params when "charset" is present in `Content-Type` header.
|
||||||
- Use http-only cookie for session
|
- Use http-only cookie for session.
|
||||||
- Inject `STDOUT` by default in `CommonLogHandler`
|
- Inject `STDOUT` by default in `CommonLogHandler`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue