Local dev: proxy patron endpoints again

tl-language-filters
Alex Gleason 2020-07-04 14:01:54 -05:00
rodzic 735a304009
commit 751261a173
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -9,6 +9,7 @@ const { settings, output } = require('./configuration');
const watchOptions = {};
const backendUrl = process.env.BACKEND_URL || 'http://localhost:4000';
const patronUrl = process.env.PATRON_URL || 'http://localhost:3037';
const secureProxy = !(process.env.PROXY_HTTPS_INSECURE === 'true');
const backendEndpoints = [
@ -25,6 +26,10 @@ const backendEndpoints = [
const makeProxyConfig = () => {
let proxyConfig = {};
proxyConfig['/api/patron'] = {
target: patronUrl,
secure: secureProxy,
};
backendEndpoints.map(endpoint => {
proxyConfig[endpoint] = {
target: backendUrl,