@@ -28,25 +28,12 @@ private[embedded_keycloak] class RestAdminFeeder(settings: Settings)
2828 with AdminFeeder {
2929
3030 override def feedAdminUser (admin : AdminUser ): Unit = {
31- val origin = s " http:// ${settings.host} : ${settings.port}"
31+ val origin = s " http://localhost : ${settings.port}"
3232 val referer = origin + " /"
3333 val url = referer + " auth/"
3434 val cookieName = " WELCOME_STATE_CHECKER"
3535
36- val getResponse = get(
37- url = url,
38- headers = Map (
39- " Connection" -> " keep-alive" ,
40- " Pragma" -> " no-cache" ,
41- " Cache-Control" -> " Cache-Control" ,
42- " Upgrade-Insecure-Requests" -> " 1" ,
43- " User-Agent" -> " Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" ,
44- " Accept" -> " text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" ,
45- " Referer" -> referer,
46- " Accept-Encoding" -> " gzip, deflate, br" ,
47- " Accept-Language" -> " en-US,en;q=0.9"
48- ),
49- )
36+ val getResponse = get(url = url)
5037
5138 if (getResponse.statusCode != 200 )
5239 throw new RuntimeException (" could not create admin user" )
@@ -58,17 +45,6 @@ private[embedded_keycloak] class RestAdminFeeder(settings: Settings)
5845
5946 val postResponse = post(
6047 url = url,
61- headers = Map (
62- " Connection" -> " keep-alive" ,
63- " Cache-Control" -> " max-age=0" ,
64- " Origin" -> origin,
65- " Upgrade-Insecure-Requests" -> " 1" ,
66- " Content-Type" -> " application/x-www-form-urlencoded" ,
67- " User-Agent" -> " Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" ,
68- " Accept" -> " text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" ,
69- " Referer" -> url,
70- " Accept-Language" -> " en-US,en;q=0.9,gl;q=0.8,de;q=0.7"
71- ),
7248 cookies = cookies,
7349 data = RequestBlob .FormEncodedRequestBlob (
7450 Map (
0 commit comments