597 Commits

Author SHA1 Message Date
TomPallister
6bd903bc87 tests passing 2020-02-09 15:37:27 +00:00
TomPallister
4bd2243f5e Merge branch 'feature/MethodTransformer' of https://github.com/pitming/Ocelot into pitming-feature/MethodTransformer 2020-02-09 14:21:35 +00:00
Tom Pallister
86e8d66daf
Activate ChangeToken when Ocelot's configuration changes #1037
* Add configuration change token (#1036)

* Add IOptionsMonitor<IInternalConfiguration>

* Activate change token from *ConfigurationRepository instead of FileAndInternalConfigurationSetter; add acceptance & integration tests

* Update documentation

* Use IWebHostEnvironment as IHostingEnvironment deprecated

Co-authored-by: Chris Swinchatt <chrisswinchatt@gmail.com>
2020-02-04 20:50:40 +00:00
EL Aisati Ahmed
f4eb93b66c Fix issue #1088 (Ocelot Administration doesn't work with .NET Core 3.x) 2020-02-04 18:20:33 +01:00
EL Aisati Ahmed
157737ef01 Revert "Merge branch 'feature/issue#1088'"
This reverts commit 914a386b0e79612a832a0ddc4c1b7fda7e8cf4a2.
2020-02-04 18:12:00 +01:00
EL Aisati Ahmed
e45071fa10 Fix issue #1088 (Ocelot Administration doesn't work with .NET Core 3.x)
Fixed OcelotMiddlewareConfigurationDelegate configuration
2020-02-04 17:59:39 +01:00
jlukawska
8985495f38 Merge remote-tracking branch 'origin/develop' into feature/603-bad-gateway 2020-01-22 14:58:04 +01:00
jlukawska
68e3ae8cdd #603 return 502 on HttpRequestException 2020-01-22 14:55:41 +01:00
TomPallister
02c9711369 Merge branch 'feature/dynamic-rate-limit-client-whitelist' of https://github.com/totubamowo/Ocelot into totubamowo-feature/dynamic-rate-limit-client-whitelist 2020-01-19 17:33:50 +00:00
TomPallister
e82e303afc Merge branch 'fix-1045' of https://github.com/catcherwong/Ocelot into catcherwong-fix-1045 2020-01-19 17:15:52 +00:00
TomPallister
9da55ea037 small changes to log all responses either information or warning 2020-01-19 16:27:08 +00:00
TomPallister
19881d51ff Merge branch 'feature/httphandler-maxconnectionperserver' of https://github.com/buretjph/Ocelot into buretjph-feature/httphandler-maxconnectionperserver 2020-01-19 10:58:31 +00:00
TomPallister
48f871088c Merge branch 'feature/683-validate-two-same-placeholders-in-upstream-template' of https://github.com/jlukawska/Ocelot into jlukawska-feature/683-validate-two-same-placeholders-in-upstream-template 2020-01-19 10:50:55 +00:00
TomPallister
96707a5055 Merge branch 'bugfix/fcp-dispose' of https://github.com/jmezach/Ocelot into jmezach-bugfix/fcp-dispose 2020-01-19 10:46:11 +00:00
彭伟
b28ced4ec5 Use registered scheme from Eureka (#1087) 2020-01-19 10:42:11 +00:00
Tom Pallister
664c6ef626
Updated to netcoreapp3.1
* added basic sample

* updated docs
2020-01-18 22:17:22 +00:00
jlukawska
caf5cf80fa #683 validate if there are duplicated placeholders in UpstreamPathTemplate 2019-12-16 21:19:31 +01:00
Jonathan Mezach
fd74ea280b Do not crash host on Dispose 2019-12-12 08:12:10 +01:00
Jean-Philippe BURET
dbb61834d9 protect code against value not in accurate range
add unit test
2019-12-10 14:23:54 +01:00
Jean-Philippe BURET
3942c329ab initial commit for new feature #1077
allow to limit the number of concurrent tcp connection to a downstream service
2019-12-10 13:50:15 +01:00
jlukawska
f35a07a3da #603 return 502 when request cannot be completed 2019-11-22 08:01:02 +01:00
jlukawska
c82a613c16 Merge remote-tracking branch 'origin/develop' into feature/492-log-500-status-code-as-error
# Conflicts:
#	test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj
2019-11-11 22:23:19 +01:00
jlukawska
90c5676887 #492 minor changes 2019-11-11 21:47:31 +01:00
Pitming
ec622dc0ad Add DownstreamHttpMethodCreatorMiddleware 2019-11-08 13:08:01 +01:00
Pitming
58b82f0fc7 Add DownstreamHttpMethodCreatorMiddleware 2019-11-08 12:59:34 +01:00
jlukawska
f0667471dd #492 log 500 with error log level, acceptance test, unit test 2019-11-07 09:18:05 +01:00
catcherwong
2c97c5859d fix 1045 2019-11-05 11:02:04 +08:00
totubamowo
21be46e680 Make rate-limiting client whitelist dynamic
* Refactor `RateLimitOptions.ClientWhiteList`
* Fix typo in variable `enbleRateLimiting`
* Fix case in variable `clientIdheader`
author Taiwo Otubamowo <totubamowo@deloitte.co.uk>
2019-10-30 18:53:37 +00:00
TomPallister
fbd9c01a42 Merge branch 'release/13.8.0' 2019-10-28 07:34:56 +00:00
geffzhang
903b380a5b update .net core 3.0 RTM (#1025)
* feat: update to asp.net core 3.0 preview 9

* fix :  AspDotNetLogger unittest

* feat:  update generic host  and  useMvc

1、Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing https://github.com/aspnet/AspNetCore/issues/9542
2、 use IHost and IHostBuilder

* feat : update .net core 3.0 rc1

* eureka extension

* fixed logger formatter error

* fixed synchronous operations are disallowed of ReadToEnd method

* fix log tests

* Flush method of FakeStream should do nothing

* Update ContentTests.cs

* Fixed ws tests

* feat: delelte comment code

* feat: update .net core 3.0 RTM

* Update OcelotBuilderTests.cs

* Update .travis.yml

mono 6.0.0 and dotnet 3.0.100

* Update Ocelot.IntegrationTests.csproj

update Microsoft.Data.SQLite 3.0.0

* Update .travis.yml

* feat: remove FrameworkReference

1、 remove FrameworkReference
2、 update package

* add appveyor configuration to use version of VS2019 with dotnet core 3 sdk support

* update obsoleted SetCollectionValidator method

* Swap out OpenCover for Coverlet

* Bump Cake to 0.35.0

* Downgrade coveralls.net to 0.7.0
Fix disposing of PollConsul instance

* Remove environment specific path separator

* Do not return ReportGenerator on Mac/Linux

* Remove direct dependency on IInternalConfiguration

* Fix ordering of variable assignment

* Fix broken tests

* Fix acceptance tests for Consul
2019-10-28 07:24:30 +00:00
Anderson de Paiva
c8a2144a4b Resolved BugFix #993 (#996) 2019-09-23 23:33:37 +08:00
Ali Rasoulian
88f31966d4 change config file's name regex pattern (#1014)
change file name pattern to accept files name by dev's conditions.
2019-09-23 23:29:18 +08:00
donaldgray
bef40041ba Add ConfigAwarePlaceholders class (#997)
* Add ConfigAwarePlaceholders class

This allows placeholder values to be sourced from IConfiguration in
addition to set values.

* Rework how IPlaceholders is decorated in container
2019-09-12 23:09:38 +08:00
tdejong-tools4ever
b6f3f0f28a Modified WebSocketMiddleWare to close connection on premature close (#998) 2019-09-12 23:07:34 +08:00
Víctor Martos
8117366313 [New feature] Support claims to path transformation (#968)
* Add the option to change DownstreamPath based on Claims

* Add tests for Claims to downstream path
2019-08-13 01:03:20 +08:00
liweihan
b32850a804 fix possible IndexOutOfRange bug (#979) 2019-08-13 01:00:21 +08:00
Thiago Loureiro
60e3a3737a
Revert "Fix to AddOcelot(), Config File Merge (#970)" (#974)
This reverts commit ffecbed43a33d65280a8ce90f98819a5ca24473d.
2019-07-28 23:27:27 +08:00
rjwester
ffecbed43a Fix to AddOcelot(), Config File Merge (#970)
* [develop]:
Added more functionality to configuration files as suggested by CesarD

* [develop]:
Clean up
2019-07-28 23:01:17 +08:00
Alex Kursov
ad00f20a23 Fix tracing wrapper. (#966) 2019-07-24 11:54:42 +08:00
Marcelo Castagna
176a7bb960
allow to add delegating handlers by type (#943) 2019-07-01 08:23:06 -03:00
Jason Morton
e1d7f28951 Fix issue #936: Kubernetes service discovery provider doesn't allow cross-namespace discovery (#938)
* Allow default k8s namespace to be overridden

* Add ServiceNamespace to ReRoute configuration

* Remove debug comments

* Update unit tests

* Unit tests (Eureka)

* Update docs

* Re-run build
2019-06-25 11:08:18 +08:00
Roc Lee
de8ec19fbb #921 Disagree "Allows access to unpass node (#825)" (#924) 2019-06-18 14:36:05 +08:00
Thiago Loureiro
60655c4056 Fixed Merge Conflicts 2019-06-01 19:52:34 +08:00
Paul Arnett
b707cd6175 Updated Consul discovery to resolve hostname (#909)
* Updated Consul discovery to resolve target API location to hostname if known Consul node, to allow SSL API certificate validation

* Handling added for null response from Consul client when querying nodes
2019-06-01 19:22:33 +08:00
Thiago Loureiro
5d82e68534
Removed unused usings, removed empty spaces, removed tons os warnings (#903) 2019-05-28 11:00:54 +08:00
liweihan
4476f8273e [WIP] use HttpContext.RequestAborted to support cancel a request (#902)
* use HttpContext.RequestAborted to support cancel a request

* register context.HttpContext.RequestAborted.ThrowIfCancellationRequested() in ExceptionHandlerMiddleware

* add LangVersion

* add default number to OcelotErrorCode
fix unit test

* revert back to one line
2019-05-27 16:23:30 +08:00
Thiago Loureiro
fe3cf44c45
Upgrade Projects (#900)
* Upgrade Projects

* Push to trigger builds

* Tried Thread Sleep before deleting file

* FileDeleteTryCatch

* Updated from AspnetCore All to App

* Travis version Upgrade (.net core 2.2)

* dotnet 2.2.105
2019-05-24 10:06:16 +08:00
Ali
5b02fb7fe7 Fix/consul poller option (#899)
* cache key now can generate from query string for request with Get Methods and request content for requests with post methods

* MD5Helper Added. OutputCacheMiddleware now can generate cache key using method, url and content

* ConsulFileConfigurationPollerOption created. consul poller option bug fixed

* ConsulFileConfigurationPollerOptionTest created
2019-05-23 09:39:12 +08:00
Thiago Loureiro
57580afa74
Release/13.6.0 (#895)
* Fixed Format Issue for Kubernetes ServiceDiscoveryProvider

* Fixes broken links (#858)

* Fix link to issue 262

* Fixes broken link to issue 340

* Fixed broken link to issue 340 (#857)

* Update information for Okta Authorization (#853)

* +dynamic claim variables (#855)

incl. tests

* IOcelotPipelineBuilder.Use(): Return IOcelotPipelineBuilder (#875)

Fixes ThreeMammals/Ocelot#685

* Fix UpstreamHost checking when reroutes duplicate validation (#864)

* Format json in reame (#877)

Format json file in AdministrationApi ReadMe

* kubernetes use in cluster (#882)

* refactor :kubernetes use in cluster

* feat:delete KubeClient

* add more flexible method to config ocelot pipeline (#880)

* update k8s doc & samples (#885)

* refactor :kubernetes use in cluster

* feat:delete KubeClient

* feat :  update k8s doc & samples

* Update kubernetes.rst

* Fix/issue666 (#889)

* cache key now can generate from query string for request with Get Methods and request content for requests with post methods

* MD5Helper Added. OutputCacheMiddleware now can generate cache key using method, url and content

* unit test created for CacheKeyGenerator

* CacheKeyGenerator Registered in OcelotBuilder as singletone

* Fix issue #890 IDefinedAggregator can't handle error codes from downstream requests (#892)

* Release/13.2.0 (#834)

* Fix formatting in getting started page (#752)

* updated release docs (#745)

* Update README.md (#756)

Fixed typo "Ocleot"

* Fixed typo there => their (#763)

* Some Typo fixes (#765)

* Typo algorythm => algorithm (#764)

* Typo querystring => query string (#766)

* Typo usual => usually (#767)

* Typos (#768)

* kubernetes provider (#772)

* feat: Kubernetes ServiceDiscoveryProvider

* 编写k8s测试例子

* feat:fix kube config

* feat: remove port

* feat : complete the k8s test

* feat :  add kubeserviceDiscovery test

* feat : add kube provider unittest

* feat :add kubetnetes docs

how to use ocelot with kubetnetes docs

* keep the configuration as simple as possible, no qos, no cache

* fix: use http

* add PollingKubeServiceDiscovery

* feat : refactor logger

* feat : add  pollkube docs

* feat:Remove unnecessary code

* feat : code-block json

* fix issue #661 for Advanced aggregations (#704)

* Add Advanced Aggregation Feature

* fix overwrite error

* distinct data for better performance

* remove constructor parameter

* fix tests issue

* fix tests

* fix tests issue

* Add UnitTest and AcceptanceTest

* fix responseKeys typo

* Update SimpleJsonResponseAggregator.cs

* change port

* Fix code example for SSL Errors (#780)

DangerousAcceptAnyServerCertificateValidator has to be set to "true" to disable certification validation, not "false".

* Changed wording for ease of reading (#776)

Just some wording changes for clarification.

* Ignore response content if null (fix #785) (#786)

* fix bug #791 (#795)

* Update loadbalancer.rst (#796)

* UriBuilder - remove leading question mark #747 (#794)

* Update qualityofservice.rst (#801)

Tiny typo

* K8s package (#804)

* feat: Kubernetes ServiceDiscoveryProvider

* 编写k8s测试例子

* feat:fix kube config

* feat: remove port

* feat : complete the k8s test

* feat :  add kubeserviceDiscovery test

* feat : add kube provider unittest

* feat :add kubetnetes docs

how to use ocelot with kubetnetes docs

* keep the configuration as simple as possible, no qos, no cache

* fix: use http

* add PollingKubeServiceDiscovery

* feat : refactor logger

* feat : add  pollkube docs

* feat:Remove unnecessary code

* feat : code-block json

* feat: publish package Ocelot.Provider.Kubernetes

* Okta integration (#807)

Okta integration

* update cliamsParser (#798)

* update cliamsParser

* update using

* IOcelotBuilder opens the IMvcCoreBuilder property for easy customization (#790)

* IOcelotBuilder opens the IMvcCoreBuilder property for easy customization

* Adjustment code

* nuget package (#809)

* feat: Kubernetes ServiceDiscoveryProvider

* 编写k8s测试例子

* feat:fix kube config

* feat: remove port

* feat : complete the k8s test

* feat :  add kubeserviceDiscovery test

* feat : add kube provider unittest

* feat :add kubetnetes docs

how to use ocelot with kubetnetes docs

* keep the configuration as simple as possible, no qos, no cache

* fix: use http

* add PollingKubeServiceDiscovery

* feat : refactor logger

* feat : add  pollkube docs

* feat:Remove unnecessary code

* feat : code-block json

* feat: publish package Ocelot.Provider.Kubernetes

* feat : nuget package

* fix: Namesapce Spelling wrong

* fix:Namesapce Spelling Wrong

* Fix: errors when using rate limiting (#811)

* Fix: errors when using rate limiting
Add: QuotaExceededError class for requesting too much
Add: QuotaExceededError error code
Add: Add an error when limit is reached
Reflact: Extract GetResponseMessage method for getting default or configured response message for requ

* Fix: modify check_we_have_considered_all_errors_in_these_tests for adding a new OcelotErrorCode

* added missing COPY csproj files (#821)

* Add note on In-Process hosting (#816)

When using ASP.NET Core 2.2 with In-Process hosting in IIS it's important to use .UseIIS() instead of .UseIISIntegration().

* Fix bug: (#810)

If the registered Consul node is unexpectedly down and not restarted immediately, other services should continue to find the registered service.

* Fixed Dockerfile (missing Kubernetes)

* Revert "Fix bug: (#810)" (#823)

This reverts commit 19c80afb05290fac3a144f652cd663c8b513a559.

* remove duplicate `IHttpRequester` register (#819)

* remove duplicate `IHttpRequester` register

* reserve the first

* fix HttpRequesterMiddleware does not call next bug (#830)

call next so that we can do something with the response, such as add some custom header etc...

* Removed Packing to fix issues, will be sorted out after create a nuget package on Nuget.Org (#831)

* Allows access to unpass node (#825)

* Fix bug:
If the registered Consul node is unexpectedly down and not restarted immediately, other services should continue to find the registered service.

* fix bug:
If the registered Consul node is unexpectedly down and not restarted immediately, other services should continue to find the registered service.

* Updated FluentValidations Nuget Package (#833)

* Removed Warnings

* Make the full DownstreamContext available to user defined aggregators

This allows error codes to be handled
2019-05-20 16:25:44 +08:00
Jason Morton
4b6c88de14 Fix issue #890 IDefinedAggregator can't handle error codes from downstream requests (#892)
* Release/13.2.0 (#834)

* Fix formatting in getting started page (#752)

* updated release docs (#745)

* Update README.md (#756)

Fixed typo "Ocleot"

* Fixed typo there => their (#763)

* Some Typo fixes (#765)

* Typo algorythm => algorithm (#764)

* Typo querystring => query string (#766)

* Typo usual => usually (#767)

* Typos (#768)

* kubernetes provider (#772)

* feat: Kubernetes ServiceDiscoveryProvider

* 编写k8s测试例子

* feat:fix kube config

* feat: remove port

* feat : complete the k8s test

* feat :  add kubeserviceDiscovery test

* feat : add kube provider unittest

* feat :add kubetnetes docs

how to use ocelot with kubetnetes docs

* keep the configuration as simple as possible, no qos, no cache

* fix: use http

* add PollingKubeServiceDiscovery

* feat : refactor logger

* feat : add  pollkube docs

* feat:Remove unnecessary code

* feat : code-block json

* fix issue #661 for Advanced aggregations (#704)

* Add Advanced Aggregation Feature

* fix overwrite error

* distinct data for better performance

* remove constructor parameter

* fix tests issue

* fix tests

* fix tests issue

* Add UnitTest and AcceptanceTest

* fix responseKeys typo

* Update SimpleJsonResponseAggregator.cs

* change port

* Fix code example for SSL Errors (#780)

DangerousAcceptAnyServerCertificateValidator has to be set to "true" to disable certification validation, not "false".

* Changed wording for ease of reading (#776)

Just some wording changes for clarification.

* Ignore response content if null (fix #785) (#786)

* fix bug #791 (#795)

* Update loadbalancer.rst (#796)

* UriBuilder - remove leading question mark #747 (#794)

* Update qualityofservice.rst (#801)

Tiny typo

* K8s package (#804)

* feat: Kubernetes ServiceDiscoveryProvider

* 编写k8s测试例子

* feat:fix kube config

* feat: remove port

* feat : complete the k8s test

* feat :  add kubeserviceDiscovery test

* feat : add kube provider unittest

* feat :add kubetnetes docs

how to use ocelot with kubetnetes docs

* keep the configuration as simple as possible, no qos, no cache

* fix: use http

* add PollingKubeServiceDiscovery

* feat : refactor logger

* feat : add  pollkube docs

* feat:Remove unnecessary code

* feat : code-block json

* feat: publish package Ocelot.Provider.Kubernetes

* Okta integration (#807)

Okta integration

* update cliamsParser (#798)

* update cliamsParser

* update using

* IOcelotBuilder opens the IMvcCoreBuilder property for easy customization (#790)

* IOcelotBuilder opens the IMvcCoreBuilder property for easy customization

* Adjustment code

* nuget package (#809)

* feat: Kubernetes ServiceDiscoveryProvider

* 编写k8s测试例子

* feat:fix kube config

* feat: remove port

* feat : complete the k8s test

* feat :  add kubeserviceDiscovery test

* feat : add kube provider unittest

* feat :add kubetnetes docs

how to use ocelot with kubetnetes docs

* keep the configuration as simple as possible, no qos, no cache

* fix: use http

* add PollingKubeServiceDiscovery

* feat : refactor logger

* feat : add  pollkube docs

* feat:Remove unnecessary code

* feat : code-block json

* feat: publish package Ocelot.Provider.Kubernetes

* feat : nuget package

* fix: Namesapce Spelling wrong

* fix:Namesapce Spelling Wrong

* Fix: errors when using rate limiting (#811)

* Fix: errors when using rate limiting
Add: QuotaExceededError class for requesting too much
Add: QuotaExceededError error code
Add: Add an error when limit is reached
Reflact: Extract GetResponseMessage method for getting default or configured response message for requ

* Fix: modify check_we_have_considered_all_errors_in_these_tests for adding a new OcelotErrorCode

* added missing COPY csproj files (#821)

* Add note on In-Process hosting (#816)

When using ASP.NET Core 2.2 with In-Process hosting in IIS it's important to use .UseIIS() instead of .UseIISIntegration().

* Fix bug: (#810)

If the registered Consul node is unexpectedly down and not restarted immediately, other services should continue to find the registered service.

* Fixed Dockerfile (missing Kubernetes)

* Revert "Fix bug: (#810)" (#823)

This reverts commit 19c80afb05290fac3a144f652cd663c8b513a559.

* remove duplicate `IHttpRequester` register (#819)

* remove duplicate `IHttpRequester` register

* reserve the first

* fix HttpRequesterMiddleware does not call next bug (#830)

call next so that we can do something with the response, such as add some custom header etc...

* Removed Packing to fix issues, will be sorted out after create a nuget package on Nuget.Org (#831)

* Allows access to unpass node (#825)

* Fix bug:
If the registered Consul node is unexpectedly down and not restarted immediately, other services should continue to find the registered service.

* fix bug:
If the registered Consul node is unexpectedly down and not restarted immediately, other services should continue to find the registered service.

* Updated FluentValidations Nuget Package (#833)

* Removed Warnings

* Make the full DownstreamContext available to user defined aggregators

This allows error codes to be handled
2019-05-20 15:44:16 +08:00