diff --git a/docs/backend-proxy.md b/docs/backend-proxy.md
index f4f43de1d..e79b6e573 100644
--- a/docs/backend-proxy.md
+++ b/docs/backend-proxy.md
@@ -20,7 +20,7 @@ const proxyConfig = [
{
context: '/api',
pathRewrite: { '^/api': '' },
- target: 'http://api.icndb.com',
+ target: 'https://api.chucknorris.io',
changeOrigin: true
}
];
diff --git a/proxy.conf.js b/proxy.conf.js
index 899183914..839646ab6 100644
--- a/proxy.conf.js
+++ b/proxy.conf.js
@@ -1,6 +1,6 @@
'use strict';
-const HttpsProxyAgent = require('https-proxy-agent');
+const { HttpsProxyAgent } = require('https-proxy-agent');
/*
* API proxy configuration.
@@ -19,9 +19,9 @@ const proxyConfig = [
];
/*
- * Configures a corporate proxy agent for the API proxy if needed.
+ * Configures a proxy agent for the API proxy if needed.
*/
-function setupForCorporateProxy(proxyConfig) {
+function setupForProxy(proxyConfig) {
if (!Array.isArray(proxyConfig)) {
proxyConfig = [proxyConfig];
}
@@ -30,14 +30,16 @@ function setupForCorporateProxy(proxyConfig) {
let agent = null;
if (proxyServer) {
- console.log(`Using corporate proxy server: ${proxyServer}`);
+ console.log(`Using proxy server: ${proxyServer}`);
agent = new HttpsProxyAgent(proxyServer);
proxyConfig.forEach((entry) => {
entry.agent = agent;
});
+ } else {
+ console.warn('No proxy server configured. API requests will not be proxied.');
}
return proxyConfig;
}
-module.exports = setupForCorporateProxy(proxyConfig);
+module.exports = setupForProxy(proxyConfig);
diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html
index b7c931200..ef5b92df5 100644
--- a/src/app/login/login.component.html
+++ b/src/app/login/login.component.html
@@ -66,11 +66,11 @@
-->