Support proxy app
This commit is contained in:
@@ -501,11 +501,18 @@ async function writeAppNginxConfig(app, fqdn, type, bundle) {
|
||||
cspQuoted: null,
|
||||
hideHeaders: [],
|
||||
proxyAuth: { enabled: false },
|
||||
upstreamUri: '', // only for endpoint === external
|
||||
ocsp: await isOcspEnabled(bundle.certFilePath)
|
||||
};
|
||||
|
||||
if (type === apps.LOCATION_TYPE_PRIMARY || type === apps.LOCATION_TYPE_ALIAS || type === apps.LOCATION_TYPE_SECONDARY) {
|
||||
data.endpoint = 'app';
|
||||
|
||||
if (app.manifest.id === constants.RELAY_APPSTORE_ID) {
|
||||
data.endpoint = 'external';
|
||||
data.upstreamUri = 'http://example.com';
|
||||
}
|
||||
|
||||
// maybe these should become per domain at some point
|
||||
const reverseProxyConfig = app.reverseProxyConfig || {}; // some of our code uses fake app objects
|
||||
if (reverseProxyConfig.robotsTxt) data.robotsTxtQuoted = JSON.stringify(app.reverseProxyConfig.robotsTxt);
|
||||
|
||||
Reference in New Issue
Block a user