README.md in macaw_framework-1.2.1 vs README.md in macaw_framework-1.2.2
- old
+ new
@@ -135,16 +135,10 @@
{
"macaw": {
"port": 8080,
"bind": "localhost",
"threads": 200,
- "log": {
- "max_length": 1024,
- "sensitive_fields": [
- "password"
- ]
- },
"cache": {
"cache_invalidation": 3600,
"ignore_headers": [
"header-to-be-ignored-from-caching-strategy",
"another-header-to-be-ignored-from-caching-strategy"
@@ -228,12 +222,25 @@
correlation IDs from the caching strategy.
- URL parameters like `...endOfUrl?key1=value1&key2=value2` can be found in the `context[:params]`
```ruby
+m = MacawFramework::Macaw.new
+
m.get('/test_params') do |context|
context[:params]["key1"] # returns: value1
end
+```
+
+- You can also set `port`, `bind` and `threads` programmatically as shown below. This will override values set in the
+`application.json` file
+
+```ruby
+m = MacawFramework::Macaw.new
+
+m.port = 3000
+m.bind = '0.0.0.0'
+m.threads = 300
```
- The default number of virtual threads in the thread pool is 200.
- Rate Limit window should also be specified in seconds. Rate limit will be activated only if the `rate_limiting` config