mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 17:28:16 +08:00
Rename all ReRoute to Route to move closer to YARP +semver: breaking
This commit is contained in:
@ -1,150 +1,150 @@
|
||||
{
|
||||
"info": {
|
||||
"_postman_id": "6234b40a-e363-4c73-8577-1c9074abb951",
|
||||
"name": "Issue645",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"item": [
|
||||
{
|
||||
"name": "1. GET http://localhost: 55580/administration/.well-known/openid-configuration",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{AccessToken}}"
|
||||
}
|
||||
],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "http://localhost:5000/administration/.well-known/openid-configuration",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "5000",
|
||||
"path": [
|
||||
"administration",
|
||||
".well-known",
|
||||
"openid-configuration"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "3. GET http://localhost: 55580/administration/configuration",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{AccessToken}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\r\n \"reRoutes\": [\r\n {\r\n \"downstreamPathTemplate\": \"/{everything}\",\r\n \"upstreamPathTemplate\": \"/templates/{everything}\",\r\n \"upstreamHttpMethod\": [\r\n \"GET\"\r\n ],\r\n \"addHeadersToRequest\": {},\r\n \"upstreamHeaderTransform\": {},\r\n \"downstreamHeaderTransform\": {},\r\n \"addClaimsToRequest\": {},\r\n \"routeClaimsRequirement\": {},\r\n \"addQueriesToRequest\": {},\r\n \"requestIdKey\": null,\r\n \"fileCacheOptions\": {\r\n \"ttlSeconds\": 0,\r\n \"region\": null\r\n },\r\n \"reRouteIsCaseSensitive\": false,\r\n \"downstreamScheme\": \"http\",\r\n \"qoSOptions\": {\r\n \"exceptionsAllowedBeforeBreaking\": 0,\r\n \"durationOfBreak\": 0,\r\n \"timeoutValue\": 0\r\n },\r\n \"loadBalancerOptions\": {\r\n \"type\": null,\r\n \"key\": null,\r\n \"expiry\": 0\r\n },\r\n \"rateLimitOptions\": {\r\n \"clientWhitelist\": [],\r\n \"enableRateLimiting\": false,\r\n \"period\": null,\r\n \"periodTimespan\": 0,\r\n \"limit\": 0\r\n },\r\n \"authenticationOptions\": {\r\n \"authenticationProviderKey\": null,\r\n \"allowedScopes\": []\r\n },\r\n \"httpHandlerOptions\": {\r\n \"allowAutoRedirect\": false,\r\n \"useCookieContainer\": false,\r\n \"useTracing\": false,\r\n \"useProxy\": true\r\n },\r\n \"downstreamHostAndPorts\": [\r\n {\r\n \"host\": \"localhost\",\r\n \"port\": 50689\r\n }\r\n ],\r\n \"upstreamHost\": null,\r\n \"key\": null,\r\n \"delegatingHandlers\": [],\r\n \"priority\": 1,\r\n \"timeout\": 0,\r\n \"dangerousAcceptAnyServerCertificateValidator\": false\r\n }\r\n ],\r\n \"aggregates\": [],\r\n \"globalConfiguration\": {\r\n \"requestIdKey\": \"Request-Id\",\r\n \"rateLimitOptions\": {\r\n \"clientIdHeader\": \"ClientId\",\r\n \"quotaExceededMessage\": null,\r\n \"rateLimitCounterPrefix\": \"ocelot\",\r\n \"disableRateLimitHeaders\": false,\r\n \"httpStatusCode\": 429\r\n },\r\n \"qoSOptions\": {\r\n \"exceptionsAllowedBeforeBreaking\": 0,\r\n \"durationOfBreak\": 0,\r\n \"timeoutValue\": 0\r\n },\r\n \"baseUrl\": \"http://localhost:55580\",\r\n \"loadBalancerOptions\": {\r\n \"type\": null,\r\n \"key\": null,\r\n \"expiry\": 0\r\n },\r\n \"downstreamScheme\": null,\r\n \"httpHandlerOptions\": {\r\n \"allowAutoRedirect\": false,\r\n \"useCookieContainer\": false,\r\n \"useTracing\": false,\r\n \"useProxy\": true\r\n }\r\n }\r\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:5000/administration/configuration",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "5000",
|
||||
"path": [
|
||||
"administration",
|
||||
"configuration"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "2. POST http://localhost: 55580/administration/connect/token",
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"var jsonData = JSON.parse(responseBody);",
|
||||
"postman.setGlobalVariable(\"AccessToken\", jsonData.access_token);",
|
||||
"postman.setGlobalVariable(\"RefreshToken\", jsonData.refresh_token);"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "client_id",
|
||||
"value": "admin",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "client_secret",
|
||||
"value": "secret",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "scope",
|
||||
"value": "admin",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "grant_type",
|
||||
"value": "client_credentials",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:5000/administration/connect/token",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "5000",
|
||||
"path": [
|
||||
"administration",
|
||||
"connect",
|
||||
"token"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
],
|
||||
"event": [
|
||||
{
|
||||
"listen": "prerequest",
|
||||
"script": {
|
||||
"id": "0f60e7b3-e4f1-4458-bbc4-fc4809e86b2d",
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"id": "1279a2cf-b771-4a86-9dfa-302b240fac62",
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
{
|
||||
"info": {
|
||||
"_postman_id": "6234b40a-e363-4c73-8577-1c9074abb951",
|
||||
"name": "Issue645",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"item": [
|
||||
{
|
||||
"name": "1. GET http://localhost: 55580/administration/.well-known/openid-configuration",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{AccessToken}}"
|
||||
}
|
||||
],
|
||||
"body": {},
|
||||
"url": {
|
||||
"raw": "http://localhost:5000/administration/.well-known/openid-configuration",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "5000",
|
||||
"path": [
|
||||
"administration",
|
||||
".well-known",
|
||||
"openid-configuration"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "3. GET http://localhost: 55580/administration/configuration",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{AccessToken}}"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\r\n \"routes\": [\r\n {\r\n \"downstreamPathTemplate\": \"/{everything}\",\r\n \"upstreamPathTemplate\": \"/templates/{everything}\",\r\n \"upstreamHttpMethod\": [\r\n \"GET\"\r\n ],\r\n \"addHeadersToRequest\": {},\r\n \"upstreamHeaderTransform\": {},\r\n \"downstreamHeaderTransform\": {},\r\n \"addClaimsToRequest\": {},\r\n \"routeClaimsRequirement\": {},\r\n \"addQueriesToRequest\": {},\r\n \"requestIdKey\": null,\r\n \"fileCacheOptions\": {\r\n \"ttlSeconds\": 0,\r\n \"region\": null\r\n },\r\n \"routeIsCaseSensitive\": false,\r\n \"downstreamScheme\": \"http\",\r\n \"qoSOptions\": {\r\n \"exceptionsAllowedBeforeBreaking\": 0,\r\n \"durationOfBreak\": 0,\r\n \"timeoutValue\": 0\r\n },\r\n \"loadBalancerOptions\": {\r\n \"type\": null,\r\n \"key\": null,\r\n \"expiry\": 0\r\n },\r\n \"rateLimitOptions\": {\r\n \"clientWhitelist\": [],\r\n \"enableRateLimiting\": false,\r\n \"period\": null,\r\n \"periodTimespan\": 0,\r\n \"limit\": 0\r\n },\r\n \"authenticationOptions\": {\r\n \"authenticationProviderKey\": null,\r\n \"allowedScopes\": []\r\n },\r\n \"httpHandlerOptions\": {\r\n \"allowAutoRedirect\": false,\r\n \"useCookieContainer\": false,\r\n \"useTracing\": false,\r\n \"useProxy\": true\r\n },\r\n \"downstreamHostAndPorts\": [\r\n {\r\n \"host\": \"localhost\",\r\n \"port\": 50689\r\n }\r\n ],\r\n \"upstreamHost\": null,\r\n \"key\": null,\r\n \"delegatingHandlers\": [],\r\n \"priority\": 1,\r\n \"timeout\": 0,\r\n \"dangerousAcceptAnyServerCertificateValidator\": false\r\n }\r\n ],\r\n \"aggregates\": [],\r\n \"globalConfiguration\": {\r\n \"requestIdKey\": \"Request-Id\",\r\n \"rateLimitOptions\": {\r\n \"clientIdHeader\": \"ClientId\",\r\n \"quotaExceededMessage\": null,\r\n \"rateLimitCounterPrefix\": \"ocelot\",\r\n \"disableRateLimitHeaders\": false,\r\n \"httpStatusCode\": 429\r\n },\r\n \"qoSOptions\": {\r\n \"exceptionsAllowedBeforeBreaking\": 0,\r\n \"durationOfBreak\": 0,\r\n \"timeoutValue\": 0\r\n },\r\n \"baseUrl\": \"http://localhost:55580\",\r\n \"loadBalancerOptions\": {\r\n \"type\": null,\r\n \"key\": null,\r\n \"expiry\": 0\r\n },\r\n \"downstreamScheme\": null,\r\n \"httpHandlerOptions\": {\r\n \"allowAutoRedirect\": false,\r\n \"useCookieContainer\": false,\r\n \"useTracing\": false,\r\n \"useProxy\": true\r\n }\r\n }\r\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:5000/administration/configuration",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "5000",
|
||||
"path": [
|
||||
"administration",
|
||||
"configuration"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "2. POST http://localhost: 55580/administration/connect/token",
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"var jsonData = JSON.parse(responseBody);",
|
||||
"postman.setGlobalVariable(\"AccessToken\", jsonData.access_token);",
|
||||
"postman.setGlobalVariable(\"RefreshToken\", jsonData.refresh_token);"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{
|
||||
"key": "client_id",
|
||||
"value": "admin",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "client_secret",
|
||||
"value": "secret",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "scope",
|
||||
"value": "admin",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "grant_type",
|
||||
"value": "client_credentials",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:5000/administration/connect/token",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "5000",
|
||||
"path": [
|
||||
"administration",
|
||||
"connect",
|
||||
"token"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
],
|
||||
"event": [
|
||||
{
|
||||
"listen": "prerequest",
|
||||
"script": {
|
||||
"id": "0f60e7b3-e4f1-4458-bbc4-fc4809e86b2d",
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"id": "1279a2cf-b771-4a86-9dfa-302b240fac62",
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -1,94 +1,94 @@
|
||||
```json
|
||||
{
|
||||
"reRoutes": [
|
||||
{
|
||||
"downstreamPathTemplate": "/{everything}",
|
||||
"upstreamPathTemplate": "/templates/{everything}",
|
||||
"upstreamHttpMethod": [
|
||||
"GET"
|
||||
],
|
||||
"addHeadersToRequest": {},
|
||||
"upstreamHeaderTransform": {},
|
||||
"downstreamHeaderTransform": {},
|
||||
"addClaimsToRequest": {},
|
||||
"routeClaimsRequirement": {},
|
||||
"addQueriesToRequest": {},
|
||||
"requestIdKey": null,
|
||||
"fileCacheOptions": {
|
||||
"ttlSeconds": 0,
|
||||
"region": null
|
||||
},
|
||||
"reRouteIsCaseSensitive": false,
|
||||
"downstreamScheme": "http",
|
||||
"qoSOptions": {
|
||||
"exceptionsAllowedBeforeBreaking": 0,
|
||||
"durationOfBreak": 0,
|
||||
"timeoutValue": 0
|
||||
},
|
||||
"loadBalancerOptions": {
|
||||
"type": null,
|
||||
"key": null,
|
||||
"expiry": 0
|
||||
},
|
||||
"rateLimitOptions": {
|
||||
"clientWhitelist": [],
|
||||
"enableRateLimiting": false,
|
||||
"period": null,
|
||||
"periodTimespan": 0,
|
||||
"limit": 0
|
||||
},
|
||||
"authenticationOptions": {
|
||||
"authenticationProviderKey": null,
|
||||
"allowedScopes": []
|
||||
},
|
||||
"httpHandlerOptions": {
|
||||
"allowAutoRedirect": false,
|
||||
"useCookieContainer": false,
|
||||
"useTracing": false,
|
||||
"useProxy": true
|
||||
},
|
||||
"downstreamHostAndPorts": [
|
||||
{
|
||||
"host": "localhost",
|
||||
"port": 50689
|
||||
}
|
||||
],
|
||||
"upstreamHost": null,
|
||||
"key": null,
|
||||
"delegatingHandlers": [],
|
||||
"priority": 1,
|
||||
"timeout": 0,
|
||||
"dangerousAcceptAnyServerCertificateValidator": false
|
||||
}
|
||||
],
|
||||
"aggregates": [],
|
||||
"globalConfiguration": {
|
||||
"requestIdKey": "Request-Id",
|
||||
"rateLimitOptions": {
|
||||
"clientIdHeader": "ClientId",
|
||||
"quotaExceededMessage": null,
|
||||
"rateLimitCounterPrefix": "ocelot",
|
||||
"disableRateLimitHeaders": false,
|
||||
"httpStatusCode": 429
|
||||
},
|
||||
"qoSOptions": {
|
||||
"exceptionsAllowedBeforeBreaking": 0,
|
||||
"durationOfBreak": 0,
|
||||
"timeoutValue": 0
|
||||
},
|
||||
"baseUrl": "http://localhost:55580",
|
||||
"loadBalancerOptions": {
|
||||
"type": null,
|
||||
"key": null,
|
||||
"expiry": 0
|
||||
},
|
||||
"downstreamScheme": null,
|
||||
"httpHandlerOptions": {
|
||||
"allowAutoRedirect": false,
|
||||
"useCookieContainer": false,
|
||||
"useTracing": false,
|
||||
"useProxy": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
```json
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"downstreamPathTemplate": "/{everything}",
|
||||
"upstreamPathTemplate": "/templates/{everything}",
|
||||
"upstreamHttpMethod": [
|
||||
"GET"
|
||||
],
|
||||
"addHeadersToRequest": {},
|
||||
"upstreamHeaderTransform": {},
|
||||
"downstreamHeaderTransform": {},
|
||||
"addClaimsToRequest": {},
|
||||
"routeClaimsRequirement": {},
|
||||
"addQueriesToRequest": {},
|
||||
"requestIdKey": null,
|
||||
"fileCacheOptions": {
|
||||
"ttlSeconds": 0,
|
||||
"region": null
|
||||
},
|
||||
"routeIsCaseSensitive": false,
|
||||
"downstreamScheme": "http",
|
||||
"qoSOptions": {
|
||||
"exceptionsAllowedBeforeBreaking": 0,
|
||||
"durationOfBreak": 0,
|
||||
"timeoutValue": 0
|
||||
},
|
||||
"loadBalancerOptions": {
|
||||
"type": null,
|
||||
"key": null,
|
||||
"expiry": 0
|
||||
},
|
||||
"rateLimitOptions": {
|
||||
"clientWhitelist": [],
|
||||
"enableRateLimiting": false,
|
||||
"period": null,
|
||||
"periodTimespan": 0,
|
||||
"limit": 0
|
||||
},
|
||||
"authenticationOptions": {
|
||||
"authenticationProviderKey": null,
|
||||
"allowedScopes": []
|
||||
},
|
||||
"httpHandlerOptions": {
|
||||
"allowAutoRedirect": false,
|
||||
"useCookieContainer": false,
|
||||
"useTracing": false,
|
||||
"useProxy": true
|
||||
},
|
||||
"downstreamHostAndPorts": [
|
||||
{
|
||||
"host": "localhost",
|
||||
"port": 50689
|
||||
}
|
||||
],
|
||||
"upstreamHost": null,
|
||||
"key": null,
|
||||
"delegatingHandlers": [],
|
||||
"priority": 1,
|
||||
"timeout": 0,
|
||||
"dangerousAcceptAnyServerCertificateValidator": false
|
||||
}
|
||||
],
|
||||
"aggregates": [],
|
||||
"globalConfiguration": {
|
||||
"requestIdKey": "Request-Id",
|
||||
"rateLimitOptions": {
|
||||
"clientIdHeader": "ClientId",
|
||||
"quotaExceededMessage": null,
|
||||
"rateLimitCounterPrefix": "ocelot",
|
||||
"disableRateLimitHeaders": false,
|
||||
"httpStatusCode": 429
|
||||
},
|
||||
"qoSOptions": {
|
||||
"exceptionsAllowedBeforeBreaking": 0,
|
||||
"durationOfBreak": 0,
|
||||
"timeoutValue": 0
|
||||
},
|
||||
"baseUrl": "http://localhost:55580",
|
||||
"loadBalancerOptions": {
|
||||
"type": null,
|
||||
"key": null,
|
||||
"expiry": 0
|
||||
},
|
||||
"downstreamScheme": null,
|
||||
"httpHandlerOptions": {
|
||||
"allowAutoRedirect": false,
|
||||
"useCookieContainer": false,
|
||||
"useTracing": false,
|
||||
"useProxy": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -1,18 +1,18 @@
|
||||
{
|
||||
"ReRoutes": [
|
||||
{
|
||||
"DownstreamPathTemplate": "/service/stats/collected",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 5100
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/api/stats/collected"
|
||||
}
|
||||
],
|
||||
"GlobalConfiguration": {
|
||||
"BaseUrl": "http://localhost:5000"
|
||||
}
|
||||
{
|
||||
"Routes": [
|
||||
{
|
||||
"DownstreamPathTemplate": "/service/stats/collected",
|
||||
"DownstreamScheme": "http",
|
||||
"DownstreamHostAndPorts": [
|
||||
{
|
||||
"Host": "localhost",
|
||||
"Port": 5100
|
||||
}
|
||||
],
|
||||
"UpstreamPathTemplate": "/api/stats/collected"
|
||||
}
|
||||
],
|
||||
"GlobalConfiguration": {
|
||||
"BaseUrl": "http://localhost:5000"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user