mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-10 18:41:36 +08:00
vhost symlink option
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
drupal: false,
|
||||
|
||||
file_structure: 'modularized',
|
||||
symlink: true,
|
||||
|
||||
referrer_policy: 'no-referrer-when-downgrade',
|
||||
content_security_policy: 'default-src * data: \'unsafe-eval\' \'unsafe-inline\'',
|
||||
@@ -311,6 +312,10 @@
|
||||
var name = sourceCode.dataset.filename;
|
||||
var content = sourceCode.children[0].children[0].innerText;
|
||||
|
||||
if (!$scope.isSymlink() && name.match(/^sites-available\//)) {
|
||||
name = name.replace(/^sites-available\//, 'sites-enabled/');
|
||||
}
|
||||
|
||||
zip.file(name, content);
|
||||
|
||||
if (name.match(/^sites-available\//)) {
|
||||
@@ -573,6 +578,10 @@
|
||||
return $scope.data.proxy;
|
||||
};
|
||||
|
||||
$scope.isSymlink = function() {
|
||||
return $scope.isModularized() && $scope.data.symlink;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//////////////////
|
||||
|
Reference in New Issue
Block a user