mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-09 13:18:39 +08:00
index, fallback refactor
This commit is contained in:
@@ -48,11 +48,10 @@
|
||||
non_www: true,
|
||||
cdn: false,
|
||||
|
||||
index: '',
|
||||
index_html: false,
|
||||
index: 'index.php',
|
||||
fallback: true,
|
||||
|
||||
php: '7.2',
|
||||
index_php: true,
|
||||
wordpress: false,
|
||||
|
||||
file_structure: 'unified',
|
||||
@@ -343,17 +342,21 @@
|
||||
};
|
||||
|
||||
$scope.isIndexHtml = function() {
|
||||
return $scope.data.index_html;
|
||||
return $scope.data.index === 'index.html';
|
||||
};
|
||||
|
||||
$scope.isIndexPhp = function() {
|
||||
return $scope.isPHP() && $scope.data.index === 'index.php';
|
||||
};
|
||||
|
||||
$scope.isFallback = function() {
|
||||
return $scope.data.fallback && (!$scope.isIndexPhp() || $scope.isPHP);
|
||||
};
|
||||
|
||||
$scope.isPHP = function() {
|
||||
return $scope.data.php !== 'off';
|
||||
};
|
||||
|
||||
$scope.isIndexPhp = function() {
|
||||
return $scope.isPHP() && $scope.data.index_php;
|
||||
};
|
||||
|
||||
$scope.isWordPress = function() {
|
||||
return $scope.isPHP() && $scope.data.wordpress;
|
||||
};
|
||||
|
Reference in New Issue
Block a user