From d0643a3ec2fe88719e5e15f405ea625279b08bd1 Mon Sep 17 00:00:00 2001 From: Luis Nabergoi <> Date: Sat, 24 Jun 2023 16:23:04 +0200 Subject: [PATCH 1/6] Changes in SequentConfig to define only path and not domain in Base URL --- SequentConfig.js | 96 +++++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/SequentConfig.js b/SequentConfig.js index 7344cec8..abffe236 100644 --- a/SequentConfig.js +++ b/SequentConfig.js @@ -20,13 +20,13 @@ * in this same file, which you might want to edit and tune if needed. */ -var SEQUENT_CONFIG_VERSION = '8.0.0'; +var SEQUENT_CONFIG_VERSION = "8.0.0"; var SequentConfigData = { // the base url path for ajax requests, for example for sending ballots or // getting info about an election. This url is usually in the form of // 'https://foo/api/v3/' and always ends in '/'. - base: '', + base: "", theme: "default", baseUrl: "https://sequent/elections/api/", freeAuthId: 1, @@ -46,7 +46,7 @@ var SequentConfigData = { // Agora Admin help url helpUrl: "https://sequentech.io/help", - authorities: ['local-auth2'], + authorities: ["local-auth2"], director: "local-auth1", // For admins: @@ -73,7 +73,7 @@ var SequentConfigData = { resourceUrlWhitelist: [ // Allow same origin resource loads. - 'self', + "self", // Allow loading from our assets domain. Notice the difference between * and **. // Uncomment the following to allow youtube videos @@ -91,20 +91,17 @@ var SequentConfigData = { // language: "es", - // Forces a specific language. // // Default: not set // lng: "es", - // specifies the set language query string. // // Default: "lang" // - detectLngQS: 'lang', - + detectLngQS: "lang", // Specifies what translations will be available. // @@ -121,8 +118,6 @@ var SequentConfigData = { // Default: 360 // // expires: 360, - - // Cookie domain // // Default: not set @@ -140,7 +135,7 @@ var SequentConfigData = { // If no Route is set, this is the route that will be loaded // // Default: '/admin/login' - defaultRoute: '/admin/login', + defaultRoute: "/admin/login", timeoutSeconds: 3600, @@ -155,17 +150,17 @@ var SequentConfigData = { email: "contact@example.com", // Sales contact email displayed in the footer links sales: "sales@example.com", - tlf: "-no tlf-" + tlf: "-no tlf-", }, // social networks footer links social: { - facebook: "https://www.facebook.com/AgoraVoting", - twitter: "https://twitter.com/sequent", - twitterHandle: "sequent", - googleplus: "https://plus.google.com/101939665794445172389/posts", - youtube: "https://www.youtube.com/results?search_query=Agora+Voting", - github: "https://github.com/sequent/" + facebook: "https://www.facebook.com/AgoraVoting", + twitter: "https://twitter.com/sequent", + twitterHandle: "sequent", + googleplus: "https://plus.google.com/101939665794445172389/posts", + youtube: "https://www.youtube.com/results?search_query=Agora+Voting", + github: "https://github.com/sequent/", }, // technology footer links @@ -174,7 +169,7 @@ var SequentConfigData = { pricing: "https://sequentech.io/#pricing", overview: "https://sequentech.io/overview/", solutions: "https://sequentech.io/solutions/", - documentation: "https://bit.ly/avguiadeuso" + documentation: "https://bit.ly/avguiadeuso", }, // legality footer links @@ -183,65 +178,74 @@ var SequentConfigData = { cookies: "https://sequentech.io/cookies/", privacy: "https://sequentech.io/privacy/", security_contact: "https://sequentech.io/security_contact/", - community_website: "https://sequent.org" + community_website: "https://sequent.org", }, documentation: { show_help: true, - faq: 'https://sequentech.io/doc/en/', - overview: 'https://sequentech.io/overview/', - technical: 'https://sequentech.io/static/generic_tech_overview_20_08_15.pdf', - security_contact: "https://sequentech.io/security_contact/" + faq: "https://sequentech.io/doc/en/", + overview: "https://sequentech.io/overview/", + technical: + "https://sequentech.io/static/generic_tech_overview_20_08_15.pdf", + security_contact: "https://sequentech.io/security_contact/", }, - documentation_html_include: '', + documentation_html_include: "", - legal_html_include: '', + legal_html_include: "", // Details pertaining to the organization that runs the software organization: { // Name of the organization, appears in the logo mouse hover, in the login // page ("Login into __NAME__ admin account"), in the poweredBy, etc - orgName: 'Sequent Tech', + orgName: "Sequent Tech", // Subtitle of the organization, used in the ballot ticket PDF - orgSubtitle: '', + orgSubtitle: "", // Big logo of the organization, used in the ballot ticket PDF - orgBigLogo: '', + orgBigLogo: "", // URL that the logo links to - orgUrl: 'https://sequentech.io' + orgUrl: "https://sequentech.io", }, verifier: { link: "", - hash: "" + hash: "", }, success: { - text: "" + text: "", }, tos: { - text:"", - title: "" + text: "", + title: "", }, - mainVersion: '8.0.0', - repoVersions: [] + mainVersion: "8.0.0", + repoVersions: [], }; -angular.module('SequentConfig', []) - .factory('ConfigService', function() { - return SequentConfigData; - }); - -angular.module('SequentConfig') - .provider('ConfigService', function ConfigServiceProvider() { +angular.module("SequentConfig", []).factory("ConfigService", function () { + baseUrl = $location.protocol() + "://" + $location.host; + SequentConfigData.publicURL = baseUrl + SequentConfigData.publicURL; + SequentConfigData.electionsAPI = baseUrl + SequentConfigData.electionsAPI; + SequentConfigData.dnieUrl = baseUrl + SequentConfigData.dnieUrl; + SequentConfigData.authAPI = baseUrl + SequentConfigData.authAPI; + SequentConfigData.baseUrl = baseUrl + SequentConfigData.baseUrl; + return SequentConfigData; +}); + +angular + .module("SequentConfig") + .provider("ConfigService", function ConfigServiceProvider() { _.extend(this, SequentConfigData); - this.$get = [function ConfigServiceProviderFactory() { - return new ConfigServiceProvider(); - }]; + this.$get = [ + function ConfigServiceProviderFactory() { + return new ConfigServiceProvider(); + }, + ]; }); From ca77bbb2567ac6171e766e2a7b5090bb89f37942 Mon Sep 17 00:00:00 2001 From: Luis Nabergoi <> Date: Sat, 24 Jun 2023 16:27:54 +0200 Subject: [PATCH 2/6] Changes in SequentConfig to define only path and not domain in Base URL --- SequentConfig.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SequentConfig.js b/SequentConfig.js index abffe236..8b3000ff 100644 --- a/SequentConfig.js +++ b/SequentConfig.js @@ -28,7 +28,7 @@ var SequentConfigData = { // 'https://foo/api/v3/' and always ends in '/'. base: "", theme: "default", - baseUrl: "https://sequent/elections/api/", + baseUrl: "/elections/api/", freeAuthId: 1, // Webpage title @@ -38,10 +38,10 @@ var SequentConfigData = { showSuccessAction: false, // AuthApi base url - authAPI: "https://sequent/iam/api/", - dnieUrl: "https://sequent.dev/iam/api/authmethod/dnie/auth/", + authAPI: "/iam/api/", + dnieUrl: "/iam/api/authmethod/dnie/auth/", // Agora Elections base url - electionsAPI: "https://sequent/elections/api/", + electionsAPI: "/elections/api/", // Agora Admin help url helpUrl: "https://sequentech.io/help", @@ -139,7 +139,7 @@ var SequentConfigData = { timeoutSeconds: 3600, - publicURL: "https://sequent/elections/public/", + publicURL: "/elections/public/", // if we are in debug mode or not debug: true, From 36c57a7fe3d82123d393feb53a46caa3897dfac0 Mon Sep 17 00:00:00 2001 From: Luis Nabergoi <> Date: Sat, 24 Jun 2023 17:14:34 +0200 Subject: [PATCH 3/6] Changes in SequentConfig to define only path and not domain in Base URL --- SequentConfig.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/SequentConfig.js b/SequentConfig.js index 8b3000ff..27388d49 100644 --- a/SequentConfig.js +++ b/SequentConfig.js @@ -228,15 +228,17 @@ var SequentConfigData = { repoVersions: [], }; -angular.module("SequentConfig", []).factory("ConfigService", function () { - baseUrl = $location.protocol() + "://" + $location.host; - SequentConfigData.publicURL = baseUrl + SequentConfigData.publicURL; - SequentConfigData.electionsAPI = baseUrl + SequentConfigData.electionsAPI; - SequentConfigData.dnieUrl = baseUrl + SequentConfigData.dnieUrl; - SequentConfigData.authAPI = baseUrl + SequentConfigData.authAPI; - SequentConfigData.baseUrl = baseUrl + SequentConfigData.baseUrl; - return SequentConfigData; -}); +angular + .module("SequentConfig", []) + .factory("ConfigService", function ($location) { + baseUrl = $location.protocol() + "://" + $location.host; + SequentConfigData.publicURL = baseUrl + SequentConfigData.publicURL; + SequentConfigData.electionsAPI = baseUrl + SequentConfigData.electionsAPI; + SequentConfigData.dnieUrl = baseUrl + SequentConfigData.dnieUrl; + SequentConfigData.authAPI = baseUrl + SequentConfigData.authAPI; + SequentConfigData.baseUrl = baseUrl + SequentConfigData.baseUrl; + return SequentConfigData; + }); angular .module("SequentConfig") From 371725b976d0b13195956052bc42a7477bbb62bc Mon Sep 17 00:00:00 2001 From: Luis Nabergoi <> Date: Mon, 26 Jun 2023 15:16:26 +0200 Subject: [PATCH 4/6] Changes in SequentConfig to define only path and not domain in Base URL changes for admin-console --- SequentConfig.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SequentConfig.js b/SequentConfig.js index 27388d49..6b85fd9f 100644 --- a/SequentConfig.js +++ b/SequentConfig.js @@ -28,7 +28,7 @@ var SequentConfigData = { // 'https://foo/api/v3/' and always ends in '/'. base: "", theme: "default", - baseUrl: "/elections/api/", + baseUrl: "/admin-api/elections/api/", freeAuthId: 1, // Webpage title @@ -38,8 +38,8 @@ var SequentConfigData = { showSuccessAction: false, // AuthApi base url - authAPI: "/iam/api/", - dnieUrl: "/iam/api/authmethod/dnie/auth/", + authAPI: "/admin-api/iam/api/", + dnieUrl: "/admin-api/iam/api/authmethod/dnie/auth/", // Agora Elections base url electionsAPI: "/elections/api/", @@ -139,7 +139,7 @@ var SequentConfigData = { timeoutSeconds: 3600, - publicURL: "/elections/public/", + publicURL: "/admin-api/elections/public/", // if we are in debug mode or not debug: true, From 2eeb30bf6c450987ebf3781cf258436684d96ecd Mon Sep 17 00:00:00 2001 From: Luis Nabergoi <> Date: Mon, 26 Jun 2023 15:22:44 +0200 Subject: [PATCH 5/6] Define BaseUrl variable 'let' --- SequentConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SequentConfig.js b/SequentConfig.js index 6b85fd9f..abfefcfb 100644 --- a/SequentConfig.js +++ b/SequentConfig.js @@ -231,7 +231,7 @@ var SequentConfigData = { angular .module("SequentConfig", []) .factory("ConfigService", function ($location) { - baseUrl = $location.protocol() + "://" + $location.host; + let baseUrl = $location.protocol() + "://" + $location.host; SequentConfigData.publicURL = baseUrl + SequentConfigData.publicURL; SequentConfigData.electionsAPI = baseUrl + SequentConfigData.electionsAPI; SequentConfigData.dnieUrl = baseUrl + SequentConfigData.dnieUrl; From 890698f22ffa0b7dc4550bff1acb1a72b2a29792 Mon Sep 17 00:00:00 2001 From: Luis Nabergoi <> Date: Mon, 26 Jun 2023 15:25:50 +0200 Subject: [PATCH 6/6] Define BaseUrl variable 'var' --- SequentConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SequentConfig.js b/SequentConfig.js index abfefcfb..b0f2a793 100644 --- a/SequentConfig.js +++ b/SequentConfig.js @@ -231,7 +231,7 @@ var SequentConfigData = { angular .module("SequentConfig", []) .factory("ConfigService", function ($location) { - let baseUrl = $location.protocol() + "://" + $location.host; + var baseUrl = $location.protocol() + "://" + $location.host; SequentConfigData.publicURL = baseUrl + SequentConfigData.publicURL; SequentConfigData.electionsAPI = baseUrl + SequentConfigData.electionsAPI; SequentConfigData.dnieUrl = baseUrl + SequentConfigData.dnieUrl;