Proxy requests to backend

stable/1.0.x
Alex Gleason 2020-03-28 00:56:50 -05:00
rodzic ca32c9bc11
commit d0cce666c2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -8,6 +8,9 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const watchOptions = {};
// TODO: Make this configurable
const backendUrl = 'http://localhost:4000';
if (process.env.VAGRANT) {
// If we are in Vagrant, we can't rely on inotify to update us with changed
// files, so we must poll instead. Here, we poll every second to see if
@ -59,5 +62,12 @@ module.exports = merge(sharedConfig, {
watchOptions
),
serveIndex: true,
proxy: {
'/api': backendUrl,
'/nodeinfo': backendUrl,
'/socket': backendUrl,
'/oauth/revoke': backendUrl,
'/.well-known/webfinger': backendUrl,
},
},
});