mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 05:48:16 +08:00
Feature/#295 consul acl (#307)
* removed file * updated package * updated package * updated package * updated package * updated package * updated package * updated package * all packages updated * #295 can add token to service provider config and this will be used by consul clients to get services and configuration * #295 wait longer for this test
This commit is contained in:
@ -38,3 +38,18 @@ and LeastConnection algorithm you can use. If no load balancer is specified Ocel
|
||||
}
|
||||
|
||||
When this is set up Ocelot will lookup the downstream host and port from the service discover provider and load balance requests across any available services.
|
||||
|
||||
ACL Token
|
||||
---------
|
||||
|
||||
If you are using ACL with Consul Ocelot supports adding the X-Consul-Token header. In order so this to work you must add the additional property below.
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
"ServiceDiscoveryProvider": {
|
||||
"Host": "localhost",
|
||||
"Port": 9500,
|
||||
"Token": "footoken"
|
||||
}
|
||||
|
||||
Ocelot will add this token to the consul client that it uses to make requests and that is then used for every request.
|
Reference in New Issue
Block a user