From 327bec598f05ac57b5a9386124f7b7f65ca88f1b Mon Sep 17 00:00:00 2001 From: Youri K Date: Thu, 18 Apr 2019 14:15:13 +0200 Subject: [PATCH 1/8] fix sitemap --- app/RequestHandler.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/RequestHandler.scala b/app/RequestHandler.scala index e36c6f73515..ef1fa36dd30 100644 --- a/app/RequestHandler.scala +++ b/app/RequestHandler.scala @@ -31,7 +31,9 @@ class RequestHandler @Inject()(router: Router, val path = request.path.replaceFirst("^(/assets/)", "") Some(assets.at(path = "/public", file = path)) } else if (request.uri.matches("""^/sitemap.xml$""") && conf.Features.isDemoInstance) { - Some(sitemapController.getSitemap(Some(request.host))) + var httpScheme = "https://" + if(!request.secure) httpScheme = "http://" + Some(sitemapController.getSitemap(Some(httpScheme + request.host))) } else { Some(Action { Ok(views.html.main(conf)) }) } From 1e70c82914f931b638036c79f9c590a75e9d4ec6 Mon Sep 17 00:00:00 2001 From: Youri K Date: Thu, 18 Apr 2019 14:34:56 +0200 Subject: [PATCH 2/8] fix linting --- app/RequestHandler.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/RequestHandler.scala b/app/RequestHandler.scala index ef1fa36dd30..b3c67a6ab28 100644 --- a/app/RequestHandler.scala +++ b/app/RequestHandler.scala @@ -32,7 +32,7 @@ class RequestHandler @Inject()(router: Router, Some(assets.at(path = "/public", file = path)) } else if (request.uri.matches("""^/sitemap.xml$""") && conf.Features.isDemoInstance) { var httpScheme = "https://" - if(!request.secure) httpScheme = "http://" + if (!request.secure) httpScheme = "http://" Some(sitemapController.getSitemap(Some(httpScheme + request.host))) } else { Some(Action { Ok(views.html.main(conf)) }) From 376a37b16d3211f7ca967f62a3f458a8fa103ee3 Mon Sep 17 00:00:00 2001 From: Youri K Date: Thu, 18 Apr 2019 15:02:23 +0200 Subject: [PATCH 3/8] change isDemo flag --- conf/application.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/application.conf b/conf/application.conf index fc1b6bfd8da..45692acead5 100644 --- a/conf/application.conf +++ b/conf/application.conf @@ -92,7 +92,7 @@ features { # if enableFrontpage is true, / will always be the /spotlight page # if it is false, / will be the login page, if not logged in, and the dashboard otherwise enableFrontpage = false - isDemoInstance = false + isDemoInstance = true } # Actor settings From e9c8446abd2e8be97ca22bba26e936c737f0608c Mon Sep 17 00:00:00 2001 From: Youri K Date: Thu, 18 Apr 2019 16:18:16 +0200 Subject: [PATCH 4/8] update snapshots --- .../backend-snapshot-tests/misc.e2e.js.md | 2 +- .../backend-snapshot-tests/misc.e2e.js.snap | Bin 1013 -> 1015 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.md b/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.md index 00b186b1b18..de41c49d148 100644 --- a/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.md +++ b/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.md @@ -71,5 +71,5 @@ Generated by [AVA](https://ava.li). discussionBoardRequiresAdmin: false, enableFrontpage: false, hideNavbarLogin: false, - isDemoInstance: false, + isDemoInstance: true, } diff --git a/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.snap b/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.snap index fdcc3a668dfdb5b444960ebb0b7baa67298713f9..1eef6fb059e8f9c801724d4695841e01b5882b46 100644 GIT binary patch delta 953 zcmV;q14jJy2lodwK~_N^Q*L2!b7*gLAa*he0sw{(#=N@1uVSebe8VP#p${L62mk;8 z00003tyNEGTtyh4ku*(z_ukuGcIUm=w7BqN=FR-RZ+`oI-+WU=2-)b?o!yf^oZSDo zc=gKu%Bgn)jKbdu3!$5z&D`#M{q5Tyym#Tbd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w%&gXbm{fXWD0R6wtiiLGKiK!g zlH-F}SYhd3G#r6UDQcYA65CoQdGA#pebnHAAB6EGE$szhy9yDfSyPKG^cZYgA)aP}tA zOz^?V&7r}6t&350t_@Wut0`%!@Vr^S!tf3A>?8~&^EXiT0e1m;d(_YD5kH%ZtZVcJ z5Z8;d5nfU-JUgONX#T8K9xb}8NemLTN#6% zP0&9D$`^p&0ryOLE^&G6`=3rXKArP!?{s>`l1Zk2s*v|}!bzPT;HRU07?x@4;tTf| zP%f3`-1#NPFO|w}X~CIuXw9EDuSc4I|2E`U!2ClBSUik?!(?D#$RQ^-psfNf1HS1! zjYq)=&jYRiz5?7ZpU9*ejvM<<6W{N>2CGC9MRj_Djsb6-DaClb$6IM@E%+J_eZfy( z^aKfd0?`@1m1jcl?O)jhf5xXZ(hl@y@^T}CTJV|j+Mq}96+z^nCdb03M!{R7+O3w5 zdbUH|Z7!4&Y8E`hi1MTnY<$0hP5Q9mfw Z6jQ6TDb8`F2|O7+(!Z85_kf`Z004w9(%%38 From f4c8af6b34197b5d05bd8882719ce5112a1cd5fb Mon Sep 17 00:00:00 2001 From: Florian M Date: Tue, 23 Apr 2019 11:00:57 +0200 Subject: [PATCH 5/8] http scheme as val --- .circleci/not-on-master.sh | 8 ++++---- app/RequestHandler.scala | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.circleci/not-on-master.sh b/.circleci/not-on-master.sh index 581393ebead..9b1c59feb61 100755 --- a/.circleci/not-on-master.sh +++ b/.circleci/not-on-master.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [ "${CIRCLE_BRANCH}" == "master" ]; then +#if [ "${CIRCLE_BRANCH}" == "master" ]; then echo "Skipping this step on master..." -else - exec "$@" -fi +#else +# exec "$@" +#fi diff --git a/app/RequestHandler.scala b/app/RequestHandler.scala index b3c67a6ab28..311152feb8c 100644 --- a/app/RequestHandler.scala +++ b/app/RequestHandler.scala @@ -31,8 +31,7 @@ class RequestHandler @Inject()(router: Router, val path = request.path.replaceFirst("^(/assets/)", "") Some(assets.at(path = "/public", file = path)) } else if (request.uri.matches("""^/sitemap.xml$""") && conf.Features.isDemoInstance) { - var httpScheme = "https://" - if (!request.secure) httpScheme = "http://" + val httpScheme = if (request.secure) "https://" else "http://" Some(sitemapController.getSitemap(Some(httpScheme + request.host))) } else { Some(Action { Ok(views.html.main(conf)) }) From 4593df2e24baa13416042f34b28b1ecbe5d2e5ad Mon Sep 17 00:00:00 2001 From: Florian M Date: Tue, 23 Apr 2019 11:21:17 +0200 Subject: [PATCH 6/8] conf.http.uri --- app/RequestHandler.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/RequestHandler.scala b/app/RequestHandler.scala index 311152feb8c..736305d62a7 100644 --- a/app/RequestHandler.scala +++ b/app/RequestHandler.scala @@ -31,8 +31,7 @@ class RequestHandler @Inject()(router: Router, val path = request.path.replaceFirst("^(/assets/)", "") Some(assets.at(path = "/public", file = path)) } else if (request.uri.matches("""^/sitemap.xml$""") && conf.Features.isDemoInstance) { - val httpScheme = if (request.secure) "https://" else "http://" - Some(sitemapController.getSitemap(Some(httpScheme + request.host))) + Some(sitemapController.getSitemap(Some(conf.Http.uri))) } else { Some(Action { Ok(views.html.main(conf)) }) } From 9d2e7fe63b33ef11df3be63d72e62445fd286ef0 Mon Sep 17 00:00:00 2001 From: Florian M Date: Tue, 23 Apr 2019 12:50:35 +0200 Subject: [PATCH 7/8] undo not on master --- .circleci/not-on-master.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/not-on-master.sh b/.circleci/not-on-master.sh index 9b1c59feb61..581393ebead 100755 --- a/.circleci/not-on-master.sh +++ b/.circleci/not-on-master.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash set -Eeuo pipefail -#if [ "${CIRCLE_BRANCH}" == "master" ]; then +if [ "${CIRCLE_BRANCH}" == "master" ]; then echo "Skipping this step on master..." -#else -# exec "$@" -#fi +else + exec "$@" +fi From 9b729a5fcfd04e65a4101e88a149e2cf924dcaa9 Mon Sep 17 00:00:00 2001 From: Florian M Date: Tue, 23 Apr 2019 14:08:44 +0200 Subject: [PATCH 8/8] new snapshots --- conf/application.conf | 2 +- .../backend-snapshot-tests/misc.e2e.js.md | 2 +- .../backend-snapshot-tests/misc.e2e.js.snap | Bin 1015 -> 1013 bytes 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/application.conf b/conf/application.conf index 45692acead5..fc1b6bfd8da 100644 --- a/conf/application.conf +++ b/conf/application.conf @@ -92,7 +92,7 @@ features { # if enableFrontpage is true, / will always be the /spotlight page # if it is false, / will be the login page, if not logged in, and the dashboard otherwise enableFrontpage = false - isDemoInstance = true + isDemoInstance = false } # Actor settings diff --git a/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.md b/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.md index de41c49d148..00b186b1b18 100644 --- a/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.md +++ b/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.md @@ -71,5 +71,5 @@ Generated by [AVA](https://ava.li). discussionBoardRequiresAdmin: false, enableFrontpage: false, hideNavbarLogin: false, - isDemoInstance: true, + isDemoInstance: false, } diff --git a/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.snap b/frontend/javascripts/test/snapshots/public/test-bundle/test/backend-snapshot-tests/misc.e2e.js.snap index 1eef6fb059e8f9c801724d4695841e01b5882b46..fdcc3a668dfdb5b444960ebb0b7baa67298713f9 100644 GIT binary patch delta 951 zcmV;o14#V$2lWRuK~_N^Q*L2!b7*gLAa*he0swhi#N{0-(7h0{7yyJNugxEe2mk;8 z00003tyNEGTtyt7ku*(z@4dIX?9O|!X>s9W=FNQbn{R)=nQy8HAsgMgvwQM~llvbR zuU^?-Ir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