Advertisement
fedorm

Untitled

Jul 11th, 2019
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.54 KB | None | 0 0
  1. defaults
  2.     timeout connect 50000
  3.     timeout client 300000
  4.     timeout server 300000
  5.     log stdout format raw local0 debug
  6.  
  7. listen stats
  8.     bind :3333
  9.     mode http
  10.     stats enable
  11.     stats hide-version
  12.     stats realm Haproxy\ Statistics
  13.     stats uri /stats
  14.     stats auth admin:324012
  15.  
  16. frontend segments-service-http
  17.     mode http
  18.     bind :8090
  19.  
  20.     # NEW
  21.     acl get-segment path_end -i /segments/v1/segment/get
  22.     acl get-client-segments path_end -i /segments/v1/client/segments/get
  23.     acl get-segment-clients path_end -i /segments/v1/segment/clients/get
  24.     acl add-client-to-segment path_end -i /segments/v1/segment/client/add
  25.     acl remove-client-from-segment path_end -i /segments/v1/segment/client/remove
  26.     acl count-clients-in-segments path_end -i /segments/v1/segment/client/count
  27.     acl create-segment path_end -i /segments/v1/segment/create
  28.     acl search-segments path_end -i /segments/v1/segment/search
  29.     acl get-task path_end -i /segments/v1/task/get
  30.     acl get-tasks path_beg -i /segments/v1/task/search
  31.     acl upload-segments path_end -i /segments/v1/upload
  32.     acl remove-clients path_end -i /segments/v1/clients/remove
  33.     acl remove-clients-segment path_end -i /segments/v1/segment/clients/remove
  34.     acl upload-clients-segment path_end -i /segments/v1/segment/clients/upload
  35.     acl archive-segment path_end -i /segments/v1/segment/archive
  36.  
  37.      # OLD
  38.     acl get-segment-old path_end -i /segments/segment/get
  39.     acl get-client-segments-old path_end -i /segments/client/segments/get
  40.     acl get-segment-clients-old path_end -i /segments/segment/clients/get
  41.     acl add-client-to-segment-old path_end -i /segments/segment/client/add
  42.     acl remove-client-from-segment-old path_end -i /segments/segment/client/remove
  43.     acl count-clients-in-segments-old path_end -i /segments/segment/client/count
  44.     acl create-segment-old path_end -i /segments/segment/create
  45.     acl search-segments-old path_end -i /segments/segment/search
  46.     acl get-task-old path_end -i /segments/task/get
  47.     acl upload-segments-old path_end -i /segments/upload
  48.     acl remove-clients-old path_end -i /segments/clients/remove
  49.     acl remove-clients-segment-old path_end -i /segments/segment/clients/remove
  50.     acl upload-clients-segment-old path_end -i /segments/segment/clients/upload
  51.     acl archive-segment-old path_end -i /segments/segment/archive
  52.  
  53.     http-request deny if !get-segment !get-client-segments !get-segment-clients !add-client-to-segment !remove-client-from-segment !count-clients-in-segments !create-segment !search-segments !upload-segments !get-task !get-tasks !remove-clients !remove-clients-segment !upload-clients-segment !get-segment-old !get-client-segments-old !get-segment-clients-old !add-client-to-segment-old !remove-client-from-segment-old !count-clients-in-segments-old !create-segment-old !search-segments-old !upload-segments-old !get-task-old !remove-clients-old !remove-clients-segment-old !upload-clients-segment-old !archive-segment !archive-segment-old
  54.  
  55.     http-request deny if !METH_GET get-segment
  56.     http-request set-path /segments/segments/get_segment if get-segment
  57.  
  58.     http-request deny if !METH_GET get-client-segments
  59.     http-request set-path /segments/segments/get_client_segments if get-client-segments
  60.  
  61.     http-request deny if !METH_GET get-segment-clients
  62.     http-request set-path /segments/segments/get_segment_clients if get-segment-clients
  63.  
  64.     http-request deny if !METH_POST add-client-to-segment
  65.     http-request set-path /segments/segments/add_client_to_segment if add-client-to-segment
  66.  
  67.     http-request deny if !METH_POST remove-client-from-segment
  68.     http-request set-path /segments/segments/remove_client_from_segment if remove-client-from-segment
  69.  
  70.     http-request deny if !METH_POST count-clients-in-segments
  71.     http-request set-path /segments/segments/count_clients_in_segments if count-clients-in-segments
  72.  
  73.     http-request deny if !METH_POST create-segment
  74.     http-request set-path /segments/segments/create_segment if create-segment
  75.  
  76.     http-request deny if !METH_GET get-task
  77.     http-request set-path /segments/utils/get_status_by_task if get-task
  78.  
  79.     http-request deny if !METH_GET get-tasks
  80.     http-request set-path /segments/utils/get_status_by_tasks if get-tasks
  81.  
  82.     http-request deny if !METH_POST upload-segments
  83.     http-request set-path /upload/segments/utils/import_segments if upload-segments
  84.  
  85.     http-request deny if !METH_POST remove-clients
  86.     http-request set-path /upload/segments/utils/remove_clients if remove-clients
  87.  
  88.     http-request deny if !METH_POST remove-clients-segment
  89.     http-request set-path /upload/segments/utils/remove_clients_from_specific_segment if remove-clients-segment
  90.  
  91.     http-request deny if !METH_POST upload-clients-segment
  92.     http-request set-path /upload/segments/utils/import_clients_to_specific_segment if upload-clients-segment
  93.  
  94.     http-request deny if !METH_GET search-segments
  95.     http-request set-path /segments/segments/get_segments_by_filter if search-segments
  96.  
  97.     http-request deny if !METH_POST archive-segment
  98.     http-request set-path /segments/segments/archive_segment if archive-segment
  99.  
  100.     # http-request deny if !get-segment-old !get-client-segments-old !get-segment-clients-old !add-client-to-segment-old !remove-client-from-segment-old !count-clients-in-segments-old !create-segment-old !search-segments-old !upload-segments-old !get-task-old !remove-clients-old !remove-clients-segment-old !upload-clients-segment-old
  101.  
  102.     http-request deny if !METH_GET get-segment-old
  103.     http-request set-path /segments/segments/get_segment if get-segment-old
  104.  
  105.     http-request deny if !METH_GET get-client-segments-old
  106.     http-request set-path /segments/segments/get_client_segments if get-client-segments-old
  107.  
  108.     http-request deny if !METH_GET get-segment-clients-old
  109.     http-request set-path /segments/segments/get_segment_clients if get-segment-clients-old
  110.  
  111.     http-request deny if !METH_POST add-client-to-segment-old
  112.     http-request set-path /segments/segments/add_client_to_segment if add-client-to-segment-old
  113.  
  114.     http-request deny if !METH_POST remove-client-from-segment-old
  115.     http-request set-path /segments/segments/remove_client_from_segment if remove-client-from-segment-old
  116.  
  117.     http-request deny if !METH_POST count-clients-in-segments-old
  118.     http-request set-path /segments/segments/count_clients_in_segments if count-clients-in-segments-old
  119.  
  120.     http-request deny if !METH_POST create-segment-old
  121.     http-request set-path /segments/segments/create_segment if create-segment-old
  122.  
  123.     http-request deny if !METH_GET get-task-old
  124.     http-request set-path /segments/utils/get_status_by_task if get-task-old
  125.  
  126.     http-request deny if !METH_POST upload-segments-old
  127.     http-request set-path /upload/segments/utils/import_segments if upload-segments-old
  128.  
  129.     http-request deny if !METH_POST remove-clients-old
  130.     http-request set-path /upload/segments/utils/remove_clients if remove-clients-old
  131.  
  132.     http-request deny if !METH_POST remove-clients-segment-old
  133.     http-request set-path /upload/segments/utils/remove_clients_from_specific_segment if remove-clients-segment-old
  134.  
  135.     http-request deny if !METH_POST upload-clients-segment-old
  136.     http-request set-path /upload/segments/utils/import_clients_to_specific_segment if upload-clients-segment-old
  137.  
  138.     http-request deny if !METH_GET search-segments-old
  139.     http-request set-path /segments/segments/get_segments_by_filter if search-segments-old
  140.  
  141.     http-request deny if !METH_POST archive-segment-old
  142.     http-request set-path /segments/segments/archive_segment if archive-segment-old
  143.  
  144.     default_backend segment-service
  145.  
  146. backend segment-service
  147.     mode http
  148.     balance roundrobin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement