ocelot.json.Gateway 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {
  2. "ReRoutes": [
  3. //UserService 8001
  4. {
  5. "DownstreamPathTemplate": "/api/{url}",
  6. "DownstreamScheme": "http",
  7. "ServiceName": "UserService",
  8. "UseServiceDiscovery": true,
  9. "UpstreamPathTemplate": "/api/user/{url}",
  10. "UpstreamHttpMethod": [ "Get", "Post" ],
  11. "LoadBalancerOptions": {
  12. "Type": "LeastConnection"
  13. }
  14. },
  15. //ContentService 8002
  16. {
  17. "DownstreamPathTemplate": "/api/{url}",
  18. "DownstreamScheme": "http",
  19. "ServiceName": "ContentService",
  20. "UseServiceDiscovery": true,
  21. "UpstreamPathTemplate": "/api/content/{url}",
  22. "UpstreamHttpMethod": [ "Get", "Post" ],
  23. "LoadBalancerOptions": {
  24. "Type": "LeastConnection"
  25. }
  26. },
  27. //ReportService 8003
  28. {
  29. "DownstreamPathTemplate": "/api/{url}",
  30. "DownstreamScheme": "http",
  31. "ServiceName": "ReportService",
  32. "UseServiceDiscovery": true,
  33. "UpstreamPathTemplate": "/api/report/{url}",
  34. "UpstreamHttpMethod": [ "Get", "Post" ],
  35. "LoadBalancerOptions": {
  36. "Type": "LeastConnection"
  37. }
  38. },
  39. //SystemConfigService 8009
  40. {
  41. "DownstreamPathTemplate": "/api/{url}",
  42. "DownstreamScheme": "http",
  43. "ServiceName": "SystemConfigService",
  44. "UseServiceDiscovery": true,
  45. "UpstreamPathTemplate": "/api/sysconfig/{url}",
  46. "UpstreamHttpMethod": [ "Get", "Post" ],
  47. "LoadBalancerOptions": {
  48. "Type": "LeastConnection"
  49. }
  50. }
  51. ],
  52. "GlobalConfiguration": {
  53. "BaseUrl": "http://gateway.iquizoo.com",
  54. "ServiceDiscoveryProvider": {
  55. "Host": "172.16.45.62",
  56. "Port": 8500,
  57. "Type": "Consul",
  58. "PollingInterval": 100
  59. }
  60. }
  61. }