Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: kemalcr/kemal

v1.11.0

13 Apr 10:45
@sdogruyol sdogruyol

Choose a tag to compare

⚠️ IMPORTANT: This release fixes two critical security vulnerabilities in previous versions of Kemal. All users are strongly advised to update immediately.

  • (SECURITY) Fix chunked multipart body limits #748. Thanks @canermastan πŸ™

This PR adds a new config option:

Kemal.config.max_multipart_form_field_size = 8 * 1024 * 1024
  • (SECURITY) Add Websocket origin validation and configuration support #749. Thanks @past3l πŸ™

This PR adds a new config option:

Kemal.config.websocket_allowed_origins = ["https://myapp.com", "http://localhost:3000"]

Contributors

canermastan and azqzazq1
Assets 2
Loading
dcalixto and mehonal reacted with thumbs up emoji sdogruyol and mehonal reacted with hooray emoji
3 people reacted

v1.10.1

24 Mar 11:27
@sdogruyol sdogruyol

Choose a tag to compare

  • Add shutdown_timeout configuration for graceful shutdown: after Kemal.stop, Kemal can wait before exit so in-flight work can finish #745. Thanks @sdogruyol πŸ™
Kemal.config.shutdown_timeout = 10.seconds

Contributors

sdogruyol
Loading
dcalixto and thomas-fazzari reacted with thumbs up emoji sdogruyol reacted with heart emoji
3 people reacted

v1.10.0

03 Mar 11:41
@sdogruyol sdogruyol

Choose a tag to compare

This is the biggest Kemal release ever with new features and a lot of improvements πŸŽ‰

  • Add modular Kemal::Router with namespaced routing, scoped filters, WebSocket support and flexible mounting while keeping the existing DSL fully compatible #731. Thanks @sdogruyol πŸ™
require "kemal"
api = Kemal::Router.new
api.namespace "/users" do
 get "/" do |env|
 env.json({users: ["alice", "bob"]})
 end
 get "/:id" do |env|
 env.text "user #{env.params.url["id"]}"
 end
end
mount "/api/v1", api
Kemal.run
  • Add use keyword for registering global and path-specific middleware, including support for arrays and insertion at a specific position in the handler chain #734. Thanks @sdogruyol πŸ™
require "kemal"
# Path-specific middlewares for /api routes
use "/api", [CORSHandler.new, AuthHandler.new]
get "/" do
 "Public home"
end
get "/api/users" do |env|
 env.json({users: ["alice", "bob"]})
end
Kemal.run
  • Enhance response helpers to provide chainable JSON/HTML/text/XML helpers, HTTP::Status support and the ability to halt execution from a chained response for concise API error handling #733, #735, #736. Thanks @sdogruyol and @mamantoha πŸ™
require "kemal"
get "/users" do |env|
 # Default JSON response
 env.json({users: ["alice", "bob"]})
end
post "/users" do |env|
 # Symbol-based HTTP::Status and chained JSON
 env.status(:created).json({id: 1, created: true})
end
get "/admin" do |env|
 # Halt immediately with HTML response
 halt env.status(403).html("<h1>Forbidden</h1>")
end
get "/api/users" do |env|
 # Custom content type (JSON:API)
 env.json({data: ["alice", "bob"]}, content_type: "application/vnd.api+json")
end
Kemal.run
  • Ensure global wildcard filters always execute while keeping namespace filters isolated to their routes #737. Thanks @mamantoha πŸ™
  • Fix CLI SSL validation and expand CLI option parsing specs #738. Thanks @sdogruyol πŸ™
  • Make route LRU cache concurrency-safe with Mutex #739. Thanks @sdogruyol πŸ™
  • Add raw_body to ParamParser for multi-handler body access (e.g. kemal-session) #740. Thanks @sdogruyol πŸ™
post "/" do |env|
 raw = env.params.raw_body # raw body, multiple handlers can call it
 env.params.body["name"] # parsed body
end

Contributors

skojin, mamantoha, and sdogruyol
Loading
zhangkaizhao, NathBabs, and paulocoghi reacted with thumbs up emoji paulocoghi, bitmand, and hugopl reacted with hooray emoji sdogruyol, aciliketcap, GalactHD, poyrazavsever, grkek, lowkeyliesmyth, Tuntii, jwoertink, hahwul, dcalixto, and paulocoghi reacted with heart emoji paulocoghi reacted with rocket emoji
15 people reacted

v1.9.0

28 Jan 11:49
@sdogruyol sdogruyol

Choose a tag to compare

  • Crystal 1.19.0 support πŸŽ‰
  • (SECURITY) Limit maximum request body size to avoid DoS attacks #730. Thanks @sdogruyol πŸ™
  • Optimize JSON parameter parsing by directly using the request body IO. Thanks @sdogruyol πŸ™

Contributors

sdogruyol
Loading
erkanunluturk, sdogruyol, and kontrastizm reacted with thumbs up emoji dcalixto, hugolgs-dev, sdogruyol, and kontrastizm reacted with heart emoji sdogruyol, hugopl, and hugolgs-dev reacted with rocket emoji
6 people reacted

v1.8.0

07 Nov 07:30
@sdogruyol sdogruyol

Choose a tag to compare

This release brings a lot of performance improvements πŸš€

  • Enhance HEAD request handling by caching GET route lookups and optimize path construction using string interpolation for improved performance #728. Thanks @sdogruyol πŸ™
  • Improve error messages #726. Thanks @sdogruyol πŸ™
  • Optimize route and websocket lookups by caching results to reduce redundant processing in the HTTP server context #725. Thanks @sdogruyol πŸ™
  • Replace full-flush Route cache with LRU and add a configurable max cache size #724. Thanks @sdogruyol πŸ™

Contributors

sdogruyol
Loading
dcalixto and ralsina reacted with heart emoji sdogruyol, straight-shoota, Sija, GalactHD, and ralsina reacted with rocket emoji
6 people reacted

v1.7.3

02 Oct 08:49
@sdogruyol sdogruyol

Choose a tag to compare

Contributors

sdogruyol
Loading
bkorkmz reacted with thumbs up emoji JadeKharats, dcalixto, and erkanunluturk reacted with heart emoji
4 people reacted

v1.7.2

04 Aug 14:19
@sdogruyol sdogruyol

Choose a tag to compare

  • Move Kemal::Handler logic into separate module #717. Thanks @syeopite πŸ™
  • Refactor server binding logic to avoid binding in test environment #719. Thanks @sdogruyol πŸ™

Contributors

sdogruyol and syeopite
Loading
JadeKharats, umtdemr, and dcalixto reacted with heart emoji sdogruyol reacted with rocket emoji
4 people reacted

v1.7.1

14 Apr 13:54
@sdogruyol sdogruyol

Choose a tag to compare

Contributors

straight-shoota and sdogruyol
Loading
JadeKharats reacted with thumbs up emoji dcalixto reacted with heart emoji
2 people reacted

v1.7.0

14 Apr 11:53
@sdogruyol sdogruyol

Choose a tag to compare

⚠️ IMPORTANT: This release fixes a critical path traversal security vulnerability in previous versions of Kemal.
All users are strongly advised to update immediately.

  • (SECURITY) Fix a Path Traversal Security issue in StaticFileHandler. See for more details. Huge THANKS to @ahmetumitbayram πŸ™
  • Crystal 1.16.0 support πŸŽ‰
  • Add ability to add handlers for raised exceptions #688. Thanks @syeopite πŸ™
require "kemal"
class NewException < Exception
end
get "/" do | env |
 raise NewException.new()
end
error NewException do | env |
 "An error occured!"
end
Kemal.run
  • Add all_files method to params to support multiple file uploads in names ending with [] #701. Thanks @sdogruyol πŸ™
images = env.params.all_files["images[]"]?
  • Embrace Crystal standard Log for logging #705. Thanks @hugopl πŸ™
  • Cleanup temporary files for file uploads #707. Thanks @sdogruyol πŸ™
  • Implement multiple partial ranges #708. Thanks @sdogruyol πŸ™

Contributors

hugopl, sdogruyol, and syeopite
Loading
MathiusD, sarbazx, JadeKharats, and hugopl reacted with heart emoji memiux reacted with eyes emoji
5 people reacted

v1.6.0

12 Oct 10:11
@sdogruyol sdogruyol

Choose a tag to compare

  • Crystal 1.14.0 support πŸŽ‰
  • Windows support #690. Thanks @sdogruyol πŸ™
  • Directory Listing: Add UTF-8 Charset to the response Content type #679. Thanks @alexkutsan @Sija πŸ™
  • Use context instead of response in static_headers helper #681. Thanks @sdogruyol πŸ™

Contributors

Sija, alexkutsan, and sdogruyol
Loading
tamdaz and sadiqmmm reacted with thumbs up emoji zw963 reacted with hooray emoji tamdaz, sadiqmmm, kemalturk, and SaulDoesCode reacted with heart emoji
5 people reacted
Previous 1 3 4 5 6
Previous

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /