Commit Graph

401 Commits

Author SHA1 Message Date
c79f1ecbf8 Middleware Invoke multi parameters (#288) 2018-03-21 06:33:22 +00:00
7e43af0126 #289 fix for issue where I was not preserving original query string when more than one query with same name (#290) 2018-03-20 20:48:30 +00:00
b51df71d7b #280 Add headers to response (#286)
* #280 can now add response headers inc trace id, now need to consolidate the header place holder stuff

* #280 changed port for linux tests

* #280 lots of hacking around to handle errors and consolidate placeholders into one class
2018-03-18 14:58:39 +00:00
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
8a2f76d0c5 #268 fix flakey acceptance test (#282)
* #268 added waiter to test, altho i wasn't able to replicate flakeyness with wait anyway! Hopefully this will be solid now!

* #268 fixed a warning

* #268 more code coverage
2018-03-17 12:54:17 +00:00
ed11f3024c Feature/#274 (#281)
* #274 added acceptance tests, need to work out failing unit tests but probably going to be a redesign where we hold a reference to the cookie container and empty it if needed

* #274 updated code coverage value

* #274 offloaded cache logic to builder in preparation for adding state

* #274 hacked something together but this is not right approach

* #274 updated defaults and docs

* #274 updated code coverage
2018-03-17 11:35:16 +00:00
c1b315173f Squash some warnings (#278)
* squash SA1649 warnings (file/type name mismatch)

* squash SA1127 warnings (generic constraint on own line)

* squash SA1507 warnings (multiple blank lines)

* squash package analysis warnings re: summary text

It's not actually possible to provide a summary right now as per
https://github.com/NuGet/Home/issues/4587

* squash missing castle.core reference warning

* squash obsolete method warnings re: AddOcelotBaseUrl
2018-03-16 17:48:11 +00:00
d24df36420 #271 Added some extra logging (#276) 2018-03-14 18:49:41 +00:00
fd2c5364fc #270 exposed ReRoute priority (#272) 2018-03-13 20:31:22 +00:00
4c840d40a6 Feature/re route specific handlers (#269)
* #264 added handlers to config

* #264 added global handlers object and defaut param for method, not sure this is correct api for users yet

* #264 Can now add all sorts of delegating handlers in all sorts of ways

* +semver: breaking #264
2018-03-10 21:02:59 +00:00
a31a3ae0fc Delegating Handlers from container (#266)
* #259 quickly hacked poc for this together, needs tidying up maybe

* #266 +semver: breaking removed adding delegating handler funcs directly...i feel from container is enough
2018-03-09 07:37:37 +00:00
28cc519341 Merge pull request #261 from binarymash/feature/ReduceBuildWarnings
Feature/reduce build warnings
2018-03-08 20:39:26 +00:00
5e9ee1f2ed #263 map all content specific headers to downstream request content property, make sure we dont map them to request specific headers, added a gzip encoding acceptance test (#267) 2018-03-08 07:32:06 +00:00
ea95690253 Fix remaining CS0649 violations 2018-03-06 11:13:02 +00:00
b8e95373a4 Fix async/await warnings 2018-03-06 10:59:01 +00:00
db05935b89 updated not supported with reasons why Ocelot doesnt support swagger (#258) 2018-03-05 20:18:58 +00:00
e1325568d2 Merge branch 'develop' into feature/#238-statefull 2018-03-03 17:12:41 +00:00
4a28666a41 #238 support passing statefull service headers to service fabric naming service 2018-03-03 17:05:40 +00:00
52166b4987 Merge remote-tracking branch 'upstream/release-3.1.8' into feature/AddStyleCopAnalyzers
# Conflicts:
#	src/Ocelot/Configuration/ServiceProviderConfiguration.cs
2018-03-03 16:28:19 +00:00
454ba3f9a0 Make Ocelot work with service fabric DNS and naming service for guest exe and stateless (#242)
* test for issue

* added service fabric sample

* working!!

* changed sample naming to Ocelot

* removed files we dont need

* removed files we dont need

* updated sample gitignore

* updated sample gitignore

* getting ocelot to work with service fabric using the reverse proxy

* #238 - added support for service fabric discovery provider, proxies requests through naming service, wont work on partioned service fabric services yet

* #238 - Manually tested service fabric using sample..all seems OK. Made some changes after testing, added docs

* #238 - added docs for servic fabric
2018-03-03 15:24:05 +00:00
50980fda93 Fix various violations
SA1216, CS0105, CS0169, CS0414, CS0649
2018-03-03 14:08:52 +00:00
a64e263a26 Fix file names to match class names
SA1649
2018-03-03 13:48:30 +00:00
c7dbfc044f Fix else statement spacing
SA1510
2018-03-03 13:36:09 +00:00
b18c8e5f2b Fix single-line comment spacing
SA1512, SA1515
2018-03-03 13:34:19 +00:00
f24c0a0510 Fix multiple statements on single line
SA1107
2018-03-03 13:29:05 +00:00
167fbb3daf Remove multiple concurrent blank lines
SA1507
2018-03-03 13:26:27 +00:00
edbed051de Remove blank lines at start/end of files
SA1517, SA1518
2018-03-03 13:16:26 +00:00
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
28a41b21a4 Merge remote-tracking branch 'upstream/develop' into feature/AddStyleCopAnalyzers
# Conflicts:
#	test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj
#	test/Ocelot.Benchmarks/Ocelot.Benchmarks.csproj
2018-03-03 12:33:04 +00:00
9f1fb002c1 Feature/#246 (#252)
* failing test

* failing test but needs real butterfly server running..need to fix that...also worked out ive broken tracing...yey

* brought in butterfly source code so i can work out how to write acceptance tests for this...

* fixed the bug but still need to fix tracing

* tracing working again across services but need to make tracing hook into new Ocelot middleware as it still uses asp.net middleware

* removed butterfly libs brought in for testing
2018-03-01 12:58:36 +00:00
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
2573657ec2 #245 ignored raft tests for now as a bit unstable 2018-02-26 08:56:37 +00:00
df86052a31 Add stylecop analyzers with default ruleset 2018-02-25 14:36:33 +00:00
9f7478c91f Feature/fix #240 (#243)
* testing issue on train

* check multiple claims of the same type for authorisation
2018-02-21 20:53:46 +00:00
1e48a97294 tests showing how this could work (#241)
* tests showing how this could work

* test passing

* test needs work

* skip test as doesnt really do anything
2018-02-21 18:54:11 +00:00
bf3188020a Feature/base url in config (#234)
* started moving baseurl to config issue 233

* fixed test
2018-02-15 09:52:16 +00:00
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
6f177fbf5b messing around (#230) 2018-02-13 23:00:41 +00:00
947a1450d0 updated docs for tracing 2018-02-13 14:23:23 +00:00
7c62b55431 added tracing to some routes 2018-02-13 09:13:34 +00:00
98133d9473 Feature/expose http handlers (#224)
* temp commit

* trying to work out how to expose the http handlers in a decent way..

* pissing about at lunch

* changed to func so you can instanciate object or new it up each time

* docs for dele handlers

* upgraded to sdk 2.1.4

* some validation for consul services
2018-02-13 09:07:09 +00:00
ef3c4f614a Monitoring (#219)
* feat:  use Https://github.com/ButterflyAPM to monitor each API request monitoring metrics

* feat: using DiagnosticSource and Butterfly.OpenTracing

* refactor:refactor Ocelot tracing, merge code into OcelotDiagnosticListener

* refactor: move OcelotHttpTracingHandler to Requester

* fix: Requester\HttpClientBuilder.cs(10,14): error CS0234: The type or namespace name 'Tracing' does not exist in the namespace

* feat: add test should_set_up_tracing

* feat : Remove extraneous code

* feat: remove unused DiagnosticSource diagnostic

* fix : test UseTracing

* add test should_call_scoped_data_repository_QosProviderError

* add test should_return_any_errors

* add test HttpClientHttpRequesterTest

*  it should keep it can not be deleted
2018-02-12 18:33:23 +00:00
a4bb0dd13b fix for #214 and some tests for the class it was in but not for the error (cant be arsed to test as have to spin up IIS) (#218) 2018-02-03 09:02:01 +00:00
5848e12d15 Feature/issue 209 upstream host based routing (#216)
* from messing around at lunch...initial hacking seems to sort of work..need to think of all the test scenarios

* drunken train hacking

* docs for upstreamhost
2018-02-02 11:06:54 +00:00
f690f287cb forgot this 2018-02-01 13:51:55 +00:00
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
f572d1b0ca downstreambaseurl placeholder for multiple location value redirects (#207) 2018-01-27 20:03:49 +00:00
d0eee70c46 Feature/transform headers (#204)
* New feature that lets a user do find and replace on an upstream header

* can transform downstream and upstream headers, not sure if interface is good

* can replace location header with placeholder

* added some syntax
2018-01-22 20:21:29 +00:00
31f526d3cd passing test for issue (#197)
* passing test for issue

* fix test when run together
2018-01-13 06:09:21 +00:00
d0b07b2cc2 this isnt used 2018-01-10 18:50:02 +00:00