feat: external shared link

pull/395/head
MrJmpl3 2022-10-03 19:24:05 -05:00
parent b7771d67a4
commit b3a942f47a
2 changed files with 5 additions and 3 deletions

View File

@ -26,15 +26,13 @@ THE SOFTWARE.
import sslProfiles from '../../util/ssl_profiles';
import websiteConf from './website.conf';
import shareQuery from '../../util/share_query';
export default (domains, global) => {
const config = {};
// Source
config['# Generated by nginxconfig.io'] = '';
const query = shareQuery(domains.map((domain, index) => [domain, index]).filter(d => d[0] !== null), global);
config[`# ${window.location.protocol}//${window.location.host}${window.location.pathname}${query}`] = '';
config['# See nginxconfig.txt to get the configuration shared link'] = '';
// Basic nginx conf
config.user = global.nginx.user.computed;

View File

@ -40,6 +40,7 @@ import magentoConf from './conf/magento.conf';
import joomlaConf from './conf/joomla.conf';
import dockerComposeYaml from './yaml/dockerCompose.yaml';
import dockerConf from './ext/docker';
import shareQuery from "../util/share_query.js";
export default (domains, global) => {
const files = {};
@ -106,5 +107,8 @@ export default (domains, global) => {
files['nginxconfig.io/php_fastcgi.conf'] = toConf(phpConf(domains));
}
const query = shareQuery(domains.map((domain, index) => [domain, index]).filter(d => d[0] !== null), global);
files['nginxconfig.txt'] = `${window.location.protocol}//${window.location.host}${window.location.pathname}${query}`;
return files;
};