41 Commits

Author SHA1 Message Date
Tom Pallister
fe3e8bd23a
Remove Ocelot specific Middleware to make Ocelot more compatible with kestrel middleware and get ready for YARP 2020-05-23 15:48:51 +01: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
Thiago Loureiro
5d82e68534
Removed unused usings, removed empty spaces, removed tons os warnings (#903) 2019-05-28 11:00:54 +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
Abolfazl
faaabbe7a7 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
2019-02-04 09:21:50 -03:00
Tom Pallister
669ece07b2
Feature/proxy reason phrase (#618)
* #599 started work to proxy reason phrase

* #599 test for aggregator
2018-09-12 19:48:56 +01:00
Tom Pallister
34afefced6
Feature/remove pivotal (#541)
* #529 removed eureka client

* #529 removed some unused code
2018-08-12 19:44:08 +05:30
Tom Pallister
d4b65198f3
#529 removed cache manager specific code (#535) 2018-08-11 18:21:07 +05:30
aqa510415008
5c940acf0e Expand other branch pipes (#416)
* Expand other branch pipes

* Expand other branch pipes

* Expand other branch pipes

* optimization Expand other branch pipes ,Add Unit test

*  I hope to add two attributes to IOcelotBuilder for easy extension.
2018-07-19 17:45:46 +01:00
Tom Pallister
a87bc92c60
Feature/test for #441 (#444)
* #441 added a test for this change

* #441 bit of tidying up and fixing of erros
2018-07-01 08:56:06 +01:00
Catcher Wong
32a258fd3f Upgrade Pivotal.Discovery.Client to Pivotal.Discovery.ClientCore (#369) 2018-05-22 07:13:45 +01:00
Tom Pallister
4f061f2b74
Feature/steeltoe (#324)
* #262 - Integrated Steeltoe Service Discovery with Ocelot for review.

* messing around

* seems to be working with eureka

* acceptance test passing with external lib references

* #262 support for netflix eureka service discovery thanks to pivotal

* #262 fixed warnings
2018-04-20 21:28:49 +01:00
Tom Pallister
a15f75dda8
#298 initial hacking around better aggregation (#310)
* #298 initial hacking around better aggregation

* #298 bit more hacking around

* #298 abstraction over httpresponsemessage

* #298 tidying up

* #298 docs

* #298 missed this
2018-04-12 17:35:04 +01:00
Tom Gardham-Pallister
d7ef956935 fixed weird error 2018-04-07 21:55:54 +01:00
Tom Pallister
0073a6f550 Merge branch 'release/5.5.0' 2018-04-07 12:08:35 +01:00
Tom Pallister
efbb950ea2
Feature/another look at logging (#303)
* #212 - hacked websockets proxy together

* faffing around

* #212 hacking away :(

* #212 websockets proxy middleware working

* #212 map when for webockets working

* #212 some test refactor

* #212 temp commit

* #212 websockets proxy working, tests passing...need to do some tidying and write docs

* #212 more code coverage

* #212 docs for websockets

* #212 updated readme

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* changing logging levels and logging like ms reccomends with structured data rather than strings

* more faffing

* more fafin

* #287 ocelot logger now only takes strings as it did take params then just turned them to strings, misleading, unit tests for logger and diagnosticlogger

* #287 errors now logged as they happen

* #287 more detail for logs requested in issue

* #287 tidy up

* #287 renamed

* #287 always log context id

* #287 fixed me being an idiot

* #287 removed crap websockets unit test that isnt a unit test

* #287 removed crap websockets unit test that isnt a unit test
2018-04-07 12:03:24 +01:00
Tom Gardham-Pallister
2c4175580f Merge branch 'release-5.3.0' 2018-03-24 09:48:59 +00:00
Tom Pallister
463a7bdab4
Feature/websockets (#273)
* #212 - hacked websockets proxy together

* faffing around

* #212 hacking away :(

* #212 websockets proxy middleware working

* #212 map when for webockets working

* #212 some test refactor

* #212 temp commit

* #212 websockets proxy working, tests passing...need to do some tidying and write docs

* #212 more code coverage

* #212 docs for websockets

* #212 updated readme

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* stuck a warning in about logging levels into docs!
2018-03-23 18:01:02 +00:00
tangdf
c79f1ecbf8 Middleware Invoke multi parameters (#288) 2018-03-21 06:33:22 +00:00
Tom Pallister
0ab670a143
Feature/#52 (#283)
* #52 test circle ci

* #52 nicked some lads cake script

* #52 put the mac build script back

* #52 trying another lads circle CI thing doesnt use cake

* #52 added test steps

* #52 ports for linux build

* #52 try travis mac build

* #52 dont use build script

* #52 dont use build script

* #52 acceptance and int tests dont really work on mac...v strange?

* #52 unique port for linux tests

* #52 increase code coverage

* #52 try using cake on linux for travis

* #52 try using cake for mac and linux on travis

* #52 dont run the acceptance and int tests on mac

* #52 build.sh has lf line endings

* #52 turns out crlf is OK for cake file..sigh

* #52 not sure what return does in cake so wrapped in if just to see

* #52 try use travis to work not run on mac

* #52 dont need these references

* #52 wrong property

* #52 remove circle ci for linux and just use travis for all
2018-03-17 18:07:27 +00:00
Philip Wood
b8e95373a4 Fix async/await warnings 2018-03-06 10:59:01 +00:00
Philip Wood
50980fda93 Fix various violations
SA1216, CS0105, CS0169, CS0414, CS0649
2018-03-03 14:08:52 +00:00
Philip Wood
167fbb3daf Remove multiple concurrent blank lines
SA1507
2018-03-03 13:26:27 +00:00
Philip Wood
c61dc9fd11 Fix brace line spacing and remove multiple concurrent whitespace characters
SA1025, SA1505, SA1508, SA-1509, SA1513
2018-03-03 13:14:24 +00:00
Tom Pallister
d1926268ac
Feature/downstream aggregation (#248)
* started messing around with this on the train last night

* mega hacking away to change middleware into Ocelot iddleware

* scoped data repo back in

* broken commit getting tests working

* another broken commit farting around with tests

* all unit tests passing again

* mw pipeline for ocelot...still loads of hacks but getting there now to get acceptance tests working, then fix config so you can have aggregate and then imlement multiplexer, then mapping to response...loads to do

* all tests passing before aggregation feature implemented

* removed all the request middleware stuff we dont need it

* updated how errors work...tho i think there could be edge case here when aggregating because one downstream could error and this would effect another

* removed multiplexer so you dont have to send route down, this isnt very thread safe...sigh

* hacking around getting the config for aggregates in, this might change

* refactored builder and unit tests passing now

* Updated a bunch of ports for tests

* plugged in code to create reroutes that are aggregates

* made multiplexer a class

* hacked test to death

* simple aggregator done, initial validation done

* removed request id from context, it is still specific for http request

* now aggregates to json always

* docs for aggregate reroutes

* Updated docs
2018-02-27 08:22:47 +00:00
Tom Pallister
bf3188020a
Feature/base url in config (#234)
* started moving baseurl to config issue 233

* fixed test
2018-02-15 09:52:16 +00:00
Tom Pallister
05481f3af3
Feature/use any id server for admin area (#232)
* initial commits around using any id servers

* add your own id server for admin area

* lots of refactoring, now instead of injecting IWebHostBuilder we just set the Ocelot base url as a configuration extension method..this means people can pass it in on the command line aswell as hardcode which is OK I guess, also can now use your own IdentityServer to authenticate admin area

* updated docs for #231

* some tests that hopefully bump up coverage
2018-02-14 18:53:18 +00:00
Tom Pallister
3ac9b3bd87
hacked together load balancing reroutes in fileconfig (#211)
* hacked together load balancing reroutes in fileconfig

* some renaming and refactoring

* more renames

* hacked away the old config json

* test for issue 213

* renamed key

* dont share ports

* oops

* updated docs

* mvoed docs around

* port being used
2018-01-31 20:34:55 +00:00
TomPallister
be24f9a9ca Added base url finder for when nothing set in Program.cs 2017-02-25 17:02:36 +00:00
TomPallister
f79b76b414 reorganised project so its a bit more vertical for features 2016-10-18 18:52:43 +01:00
TomPallister
2e6640c6ef refactoring configuration code so its not so crazy, still need to work on the creator class 2016-10-18 18:32:34 +01:00
TomPallister
707f1d6908 renamed and removed some stuff that wasnt needed 2016-10-18 16:22:51 +01:00
TomPallister
84256e7bac Added ability to strip claims and forward to downstream service as headers 2016-10-18 15:51:56 +01:00
tom.pallister
3d60602c7e Added a get authentication test, removed the infrastructure name space as it seemed pointless, started thinking about how to pass claims on with the request 2016-10-17 18:00:36 +01:00
TomPallister
ce84ad4fc2 Added tests for identity server reference tokens, general refactoring and come config validation 2016-10-16 20:28:23 +01:00
TomPallister
7289cd803b renamed provider to handler 2016-10-16 16:47:08 +01:00
TomPallister
320b442526 got identity server access token acceptance test working, created factory for choosing auth handlers, a creator for making the auth handlers, some general refactoring...next step is injecting the config for the auth handler creator in some way or just passing it in 2016-10-15 13:50:43 +01:00
TomPallister
34bac7e0d4 Added first authentiction code..we have a test that makes sure we are unauthenticed but i havent been able to get authenticated to work yet due to identity server usual madness when calling with their SDK! 2016-10-15 11:17:18 +01:00
tom.pallister
f545ba8620 removed thing that checks if route is authorised cos we dont need it 2016-10-14 20:08:09 +01:00
TomPallister
7ae35f4ce3 added happy path tests for more middlewares 2016-10-13 19:59:12 +01:00
tom.pallister
52ba77f4d5 adding midleware tests 2016-10-13 19:10:11 +01:00