-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
291 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,2 @@ | ||
### SILVERSTRIPE START ### | ||
|
||
# Deny access to templates (but allow from localhost) | ||
<Files *.ss> | ||
Order deny,allow | ||
Deny from all | ||
Allow from 127.0.0.1 | ||
</Files> | ||
|
||
# Deny access to IIS configuration | ||
<Files web.config> | ||
Order deny,allow | ||
Deny from all | ||
</Files> | ||
|
||
# Deny access to YAML configuration files which might include sensitive information | ||
<Files ~ "\.ya?ml$"> | ||
Order allow,deny | ||
Deny from all | ||
</Files> | ||
|
||
# Route errors to static pages automatically generated by SilverStripe | ||
ErrorDocument 404 /assets/error-404.html | ||
ErrorDocument 500 /assets/error-500.html | ||
|
||
<IfModule mod_rewrite.c> | ||
|
||
# Turn off index.php handling requests to the homepage fixes issue in apache >=2.4 | ||
<IfModule mod_dir.c> | ||
DirectoryIndex disabled | ||
DirectorySlash On | ||
</IfModule> | ||
|
||
SetEnv HTTP_MOD_REWRITE On | ||
RewriteEngine On | ||
|
||
# Enable HTTP Basic authentication workaround for PHP running in CGI mode | ||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | ||
|
||
# Deny access to potentially sensitive files and folders | ||
RewriteRule ^vendor(/|$) - [F,L,NC] | ||
RewriteRule ^\.env - [F,L,NC] | ||
RewriteRule silverstripe-cache(/|$) - [F,L,NC] | ||
RewriteRule composer\.(json|lock) - [F,L,NC] | ||
RewriteRule (error|silverstripe|debug)\.log - [F,L,NC] | ||
|
||
# Process through SilverStripe if no file with the requested name exists. | ||
# Pass through the original path as a query parameter, and retain the existing parameters. | ||
# Try finding framework in the vendor folder first | ||
RewriteCond %{REQUEST_URI} ^(.*)$ | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule .* index.php | ||
|
||
</IfModule> | ||
|
||
### SILVERSTRIPE END ### | ||
RewriteEngine On | ||
RewriteRule ^(.*)$ public/$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,6 @@ Name: app-theme | |
|
||
SilverStripe\View\SSViewer: | ||
themes: | ||
- '$public' | ||
- 'silverware-theme' | ||
- '$default' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of {app-title}. | ||
* | ||
* PHP version >=5.6.0 | ||
* | ||
* For full copyright and license information, please view the | ||
* LICENSE.md file that was distributed with this source code. | ||
* | ||
* @package {app-namespace} | ||
* @author {author-name} <{author-email}> | ||
* @copyright {year} {author-company} | ||
* @license {license-link} {license-name} | ||
* @link {project-link} | ||
*/ | ||
|
||
namespace { | ||
|
||
use SilverStripe\CMS\Model\SiteTree; | ||
|
||
/** | ||
* An extension of the site tree class for the standard SilverStripe page. | ||
* | ||
* As SilverStripe relies on having a global Page class available, this class is | ||
* intentionally defined without a namespace in order to keep SilverStripe happy. | ||
* | ||
* @package {app-namespace} | ||
* @author {author-name} <{author-email}> | ||
* @copyright {year} {author-company} | ||
* @license {license-link} {license-name} | ||
* @link {project-link} | ||
*/ | ||
class Page extends SiteTree | ||
{ | ||
/** | ||
* Human-readable singular name. | ||
* | ||
* @var string | ||
* @config | ||
*/ | ||
private static $singular_name = 'Page'; | ||
|
||
/** | ||
* Human-readable plural name. | ||
* | ||
* @var string | ||
* @config | ||
*/ | ||
private static $plural_name = 'Pages'; | ||
|
||
/** | ||
* Description of this object. | ||
* | ||
* @var string | ||
* @config | ||
*/ | ||
private static $description = 'Standard content page'; | ||
|
||
/** | ||
* Icon file for this page type. | ||
* | ||
* @var string | ||
* @config | ||
*/ | ||
private static $icon = 'app/admin/client/dist/images/icons/Page.png'; | ||
|
||
/** | ||
* Defines the table name to use for this object. | ||
* | ||
* @var string | ||
* @config | ||
*/ | ||
private static $table_name = 'Page'; | ||
} | ||
|
||
} |
Oops, something went wrong.