mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
NEW Add .env support
This commit is contained in:
parent
a4d886e9d4
commit
06b475896d
9
.env.example
Normal file
9
.env.example
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# For a complete list of core environment variables see
|
||||||
|
# https://docs.silverstripe.org/en/4/getting_started/environment_management/#core-environment-variables
|
||||||
|
|
||||||
|
# DB credentials
|
||||||
|
SS_DATABASE_CLASS="MySQLPDODatabase"
|
||||||
|
SS_DATABASE_SERVER="localhost"
|
||||||
|
SS_DATABASE_USERNAME="<user>"
|
||||||
|
SS_DATABASE_PASSWORD="<password>"
|
||||||
|
SS_DATABASE_NAME="<database>"
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,8 +1,8 @@
|
|||||||
# ignore cache folder
|
# ignore cache folder
|
||||||
/silverstripe-cache/
|
/silverstripe-cache/
|
||||||
|
|
||||||
# ignore all environment files
|
# ignore .env file
|
||||||
_ss_environment.php
|
/.env
|
||||||
|
|
||||||
# ignore build tools
|
# ignore build tools
|
||||||
/tools/phing-metadata
|
/tools/phing-metadata
|
||||||
|
@ -44,6 +44,7 @@ ErrorDocument 500 /assets/error-500.html
|
|||||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
# Deny access to potentially sensitive files and folders
|
# Deny access to potentially sensitive files and folders
|
||||||
|
RewriteRule ^\.env - [F,L,NC]
|
||||||
RewriteRule ^vendor(/|$) - [F,L,NC]
|
RewriteRule ^vendor(/|$) - [F,L,NC]
|
||||||
RewriteRule silverstripe-cache(/|$) - [F,L,NC]
|
RewriteRule silverstripe-cache(/|$) - [F,L,NC]
|
||||||
RewriteRule composer\.(json|lock) - [F,L,NC]
|
RewriteRule composer\.(json|lock) - [F,L,NC]
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<security>
|
<security>
|
||||||
<requestFiltering>
|
<requestFiltering>
|
||||||
<hiddenSegments>
|
<hiddenSegments>
|
||||||
|
<add segment=".env" />
|
||||||
<add segment="silverstripe-cache" />
|
<add segment="silverstripe-cache" />
|
||||||
<add segment="vendor" />
|
<add segment="vendor" />
|
||||||
<add segment="composer.json" />
|
<add segment="composer.json" />
|
||||||
|
Loading…
Reference in New Issue
Block a user