mirror of
				https://github.com/digitalocean/nginxconfig.io.git
				synced 2025-11-04 18:28:17 +08:00 
			
		
		
		
	Move share link from nginx.conf to nginxconfig.txt (#395)
* ✨ feat: external shared link * ✅ chore: apply eslint * Update src/nginxconfig/generators/index.js Co-authored-by: Matt Cowley <me@mattcowley.co.uk> * Update src/nginxconfig/generators/conf/nginx.conf.js Co-authored-by: Matt Cowley <me@mattcowley.co.uk> Co-authored-by: Matt Cowley <me@mattcowley.co.uk>
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							400911d695
						
					
				
				
					commit
					4fabd0c0d9
				
			@@ -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 for the configuration share link'] = '';
 | 
			
		||||
 | 
			
		||||
    // Basic nginx conf
 | 
			
		||||
    config.user = global.nginx.user.computed;
 | 
			
		||||
 
 | 
			
		||||
@@ -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';
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user