<commit_before>global
        #chroot /var/lib/haproxy
        #user haproxy
        #group haproxy
        stats socket /run/haproxy/admin.sock mode 660 level admin
        stats timeout 30s
	ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL
	log /dev/stdout local0 info

userlist admins
  user admin insecure-password PLACEHOLDER_PASSWORD

defaults
	mode	http
	retries 3
	option redispatch
	option dontlog-normal
	option dontlognull
    timeout connect 5000
    timeout client  500000
    timeout server  500000
	errorfile 400 /etc/haproxy/errors/400.http
	errorfile 403 /etc/haproxy/errors/403.http
	errorfile 408 /etc/haproxy/errors/408.http
	errorfile 500 /etc/haproxy/errors/500.http
	errorfile 502 /etc/haproxy/errors/502.http
	errorfile 503 /etc/haproxy/errors/503.http
	errorfile 504 /etc/haproxy/errors/504.http

frontend frontend-ssl
  bind *:443 ssl crt /etc/ssl/proxy.pem
  mode http
  option httplog
  redirect prefix https://gameontext.org code 301 if { hdr(host) -i game-on.org }
  redirect prefix https://book.gameontext.org code 301 if { hdr(host) -i book.game-on.org }

  acl player path_beg -i /play
  use_backend player	if player

  acl auth path_beg -i /auth
  use_backend auth	if auth

  acl map path_beg -i /map
  use_backend map if map

  acl swagger	 path_beg -i /swagger
  use_backend swagger		if swagger
  
  acl slackin	 path_beg -i /slackin
  use_backend slackin		if slackin

  acl mediator path_beg -i /mediator
  use_backend mediator  if mediator
  
  acl interactivemap path_beg -i /interactivemap
  http-request redirect location https://gameon-interactivemap.mybluemix.net/interactivemap code 301 if interactivemap

  default_backend static-content

frontend frontend-plain
  bind *:80
  mode http
  option httplog
  redirect prefix https://gameontext.org code 301 if { hdr(host) -i game-on.org }
  redirect prefix https://book.gameontext.org code 301 if { hdr(host) -i book.game-on.org }
  redirect scheme https code 301 if !{ ssl_fc }


backend map
  mode http
  option httplog
  option httpchk GET /map/map/v1/health HTTP/1.1\r\nHost:localhost
  balance roundrobin
  acl map2 path_beg -i /map/map
  http-request set-uri http://%[req.hdr(Host)]/map%[path]?%[query] if !map2
  server map1 ${MAP_ENDPOINT} check verify none

backend mediator
  mode http
  option httplog
  balance roundrobin
  acl mediator2 path_beg -i /mediator/mediator
  http-request set-uri http://%[req.hdr(Host)]/mediator%[path]?%[query] if !mediator2
  server mediator1 ${MEDIATOR_ENDPOINT} check verify none

backend auth
  mode http
  option httplog
  option httpchk GET /auth/auth/health HTTP/1.1\r\nHost:localhost
  balance roundrobin
  acl auth2 path_beg -i /auth/auth
  http-request set-uri http://%[req.hdr(Host)]/auth%[path]?%[query] if !auth2
  server auth1 ${AUTH_ENDPOINT} check verify none

backend player
  mode http
  option httplog
  balance roundrobin
  acl player2 path_beg -i /players/players
  http-request set-uri http://%[req.hdr(Host)]/players%[path]?%[query] if !player2
  server player1 ${PLAYER_ENDPOINT} check verify none
  
backend slackin
  mode http
  option httplog
  balance roundrobin
  acl slackin2 path_beg -i /slackin/slackin
  http-request set-uri http://%[req.hdr(Host)]/slackin%[path]?%[query] if !slackin2
  server slackin1 ${PLAYER_ENDPOINT} check verify none

backend swagger
  mode http
  acl swagger_root path -i /swagger
  redirect location /swagger/ if swagger_root
  option httpchk HEAD /swagger/ HTTP/1.1\r\nHost:localhost
  option httplog
  balance roundrobin
  acl swagger2 path_beg -i /swagger/swagger/
  http-request set-uri http://%[req.hdr(Host)]/swagger%[path]?%[query] if !swagger2  
  server swagger1 ${SWAGGER_ENDPOINT} check
  
backend static-content
  mode http
  option httpchk HEAD /webapp/ HTTP/1.1\r\nHost:localhost
  option httplog
  balance roundrobin
  acl webapp2 path_beg -i /webapp/
  http-request set-uri http://%[req.hdr(Host)]/webapp%[path]?%[query] if !webapp2  
  server webapp1 ${WEBAPP_ENDPOINT} check inter 1m<commit_msg>Update to slackin endpoint<commit_after>global
        #chroot /var/lib/haproxy
        #user haproxy
        #group haproxy
        stats socket /run/haproxy/admin.sock mode 660 level admin
        stats timeout 30s
	ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL
	log /dev/stdout local0 info

userlist admins
  user admin insecure-password PLACEHOLDER_PASSWORD

defaults
	mode	http
	retries 3
	option redispatch
	option dontlog-normal
	option dontlognull
    timeout connect 5000
    timeout client  500000
    timeout server  500000
	errorfile 400 /etc/haproxy/errors/400.http
	errorfile 403 /etc/haproxy/errors/403.http
	errorfile 408 /etc/haproxy/errors/408.http
	errorfile 500 /etc/haproxy/errors/500.http
	errorfile 502 /etc/haproxy/errors/502.http
	errorfile 503 /etc/haproxy/errors/503.http
	errorfile 504 /etc/haproxy/errors/504.http

frontend frontend-ssl
  bind *:443 ssl crt /etc/ssl/proxy.pem
  mode http
  option httplog
  redirect prefix https://gameontext.org code 301 if { hdr(host) -i game-on.org }
  redirect prefix https://book.gameontext.org code 301 if { hdr(host) -i book.game-on.org }

  acl player path_beg -i /play
  use_backend player	if player

  acl auth path_beg -i /auth
  use_backend auth	if auth

  acl map path_beg -i /map
  use_backend map if map

  acl swagger	 path_beg -i /swagger
  use_backend swagger		if swagger
  
  acl slackin	 path_beg -i /slackin
  use_backend slackin		if slackin

  acl mediator path_beg -i /mediator
  use_backend mediator  if mediator
  
  acl interactivemap path_beg -i /interactivemap
  http-request redirect location https://gameon-interactivemap.mybluemix.net/interactivemap code 301 if interactivemap

  default_backend static-content

frontend frontend-plain
  bind *:80
  mode http
  option httplog
  redirect prefix https://gameontext.org code 301 if { hdr(host) -i game-on.org }
  redirect prefix https://book.gameontext.org code 301 if { hdr(host) -i book.game-on.org }
  redirect scheme https code 301 if !{ ssl_fc }


backend map
  mode http
  option httplog
  option httpchk GET /map/map/v1/health HTTP/1.1\r\nHost:localhost
  balance roundrobin
  acl map2 path_beg -i /map/map
  http-request set-uri http://%[req.hdr(Host)]/map%[path]?%[query] if !map2
  server map1 ${MAP_ENDPOINT} check verify none

backend mediator
  mode http
  option httplog
  balance roundrobin
  acl mediator2 path_beg -i /mediator/mediator
  http-request set-uri http://%[req.hdr(Host)]/mediator%[path]?%[query] if !mediator2
  server mediator1 ${MEDIATOR_ENDPOINT} check verify none

backend auth
  mode http
  option httplog
  option httpchk GET /auth/auth/health HTTP/1.1\r\nHost:localhost
  balance roundrobin
  acl auth2 path_beg -i /auth/auth
  http-request set-uri http://%[req.hdr(Host)]/auth%[path]?%[query] if !auth2
  server auth1 ${AUTH_ENDPOINT} check verify none

backend player
  mode http
  option httplog
  balance roundrobin
  acl player2 path_beg -i /players/players
  http-request set-uri http://%[req.hdr(Host)]/players%[path]?%[query] if !player2
  server player1 ${PLAYER_ENDPOINT} check verify none
  
backend slackin
  mode http
  option httplog
  balance roundrobin
  acl slackin2 path_beg -i /slackin/slackin
  http-request set-uri http://%[req.hdr(Host)]/slackin%[path]?%[query] if !slackin2
  server slackin1 ${SLACKIN_ENDPOINT} check verify none

backend swagger
  mode http
  acl swagger_root path -i /swagger
  redirect location /swagger/ if swagger_root
  option httpchk HEAD /swagger/ HTTP/1.1\r\nHost:localhost
  option httplog
  balance roundrobin
  acl swagger2 path_beg -i /swagger/swagger/
  http-request set-uri http://%[req.hdr(Host)]/swagger%[path]?%[query] if !swagger2  
  server swagger1 ${SWAGGER_ENDPOINT} check
  
backend static-content
  mode http
  option httpchk HEAD /webapp/ HTTP/1.1\r\nHost:localhost
  option httplog
  balance roundrobin
  acl webapp2 path_beg -i /webapp/
  http-request set-uri http://%[req.hdr(Host)]/webapp%[path]?%[query] if !webapp2  
  server webapp1 ${WEBAPP_ENDPOINT} check inter 1m
{'fraction_non_alphanumeric': 0.0929889298892989, 'fraction_numerical': 0.03050430504305043, 'mean_word_length': 3.7, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1596525', 'n_tokens_mistral': 3163, 'n_tokens_neox': 2899, 'n_words': 796}