Skip to content

Commit

Permalink
Merge pull request #699 from 3scale/3.2-rc2
Browse files Browse the repository at this point in the history
3.2.0 rc2
  • Loading branch information
mikz authored May 11, 2018
2 parents 46ba9e3 + afa40d4 commit 03bb068
Show file tree
Hide file tree
Showing 15 changed files with 586 additions and 385 deletions.
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [3.2.0-rc2] - 2018-05-11

### Added

- Default value for the `caching_type` attribute of the caching policy config schema [#691](https://github.com/3scale/apicast/pull/691), [THREESCALE-845](https://issues.jboss.org/browse/THREESCALE-845)

### Fixed

- Fixed set of valid values for the exit param of the Echo policy [PR #684](https://github.com/3scale/apicast/pull/684/)

### Changed

- The schema of the rate-limit policy has been adapted so it can be rendered by `react-jsonschema-form`, a library used in the 3scale UI. This is a breaking change. [PR #696](https://github.com/3scale/apicast/pull/696), [THREESCALE-888](https://issues.jboss.org/browse/THREESCALE-888)
- The upstream policy now performs the rule matching in the rewrite phase. This allows combining it with the URL rewriting policy – upstream policy regex will be matched against the original path if upstream policy is placed before URL rewriting in the policy chain, and against the rewritten path otherwise [PR #690](https://github.com/3scale/apicast/pull/690), [THREESCALE-852](https://issues.jboss.org/browse/THREESCALE-852)

## [3.2.0-rc1] - 2018-04-24

### Added
Expand Down Expand Up @@ -382,7 +397,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- Major rewrite using JSON configuration instead of code generation.

[Unreleased]: https://github.com/3scale/apicast/compare/v3.2.0-rc1...HEAD
[Unreleased]: https://github.com/3scale/apicast/compare/v3.2.0-rc2...HEAD
[2.0.0]: https://github.com/3scale/apicast/compare/v0.2...v2.0.0
[3.0.0-alpha1]: https://github.com/3scale/apicast/compare/v2.0.0...v3.0.0-alpha1
[3.0.0-alpha2]: https://github.com/3scale/apicast/compare/v3.0.0-alpha1...v3.0.0-alpha2
Expand All @@ -402,3 +417,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
[3.2.0-beta2]: https://github.com/3scale/apicast/compare/v3.2.0-beta1...v3.2.0-beta2
[3.2.0-beta3]: https://github.com/3scale/apicast/compare/v3.2.0-beta2...v3.2.0-beta3
[3.2.0-rc1]: https://github.com/3scale/apicast/compare/v3.2.0-beta3...v3.2.0-rc1
[3.2.0-rc2]: https://github.com/3scale/apicast/compare/v3.2.0-rc1...v3.2.0-rc2
6 changes: 0 additions & 6 deletions doc/policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ mapping rules of APIcast will be applied against the rewritten path.
However, if the URL policy appears after the APIcast one, the mapping rules
will be applied against the original path.

Another example, suppose that we combine the upstream policy with the URL
rewriting one. The upstream policy acts on the content phase, whereas the URL
rewriting one acts on the rewrite phase. This means that the upstream policy
will always take into account the rewritten path instead of the original one,
regardless of the position of the policies in the chain.

### Types

There are two types of policy chains in APIcast: per-service chains and a
Expand Down
38 changes: 20 additions & 18 deletions examples/policies/rate_limit_configuration.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
local policy_chain = require('apicast.policy_chain').default()

local rate_limit_policy = require('apicast.policy.rate_limit').new({
limiters = {
{
name = "connections",
key = {name = "limit1"},
conn = 20,
burst = 10,
delay = 0.5
connection_limiters = {
{
key = {name = "limit1"},
conn = 20,
burst = 10,
delay = 0.5
}
},
{
name = "leaky_bucket",
key = {name = "limit2"},
rate = 18,
burst = 9
leaky_bucket_limiters = {
{
key = {name = "limit2"},
rate = 18,
burst = 9
}
},
fixed_window_limiters = {
{
key = {name = "limit3"},
count = 10,
window = 10
}
},
{
name = "fixed_window",
key = {name = "limit3"},
count = 10,
window = 10
}},
redis_url = "redis://localhost:6379/1"
})

Expand Down
3 changes: 2 additions & 1 deletion gateway/src/apicast/policy/caching/apicast-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"enum": ["none"],
"title": "Disable caching."
}
]
],
"default": "none"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gateway/src/apicast/policy/echo/apicast-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"title": "Interrupt the processing of the request."
},
{
"enum": ["set"],
"enum": ["phase"],
"title": "Skip only the rewrite phase."
}
]
Expand Down
Loading

0 comments on commit 03bb068

Please sign in to comment.