Add CORS_ALLOW_ALL for dev sites
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
9077d0aa86
commit
650d531ed1
|
@ -58,6 +58,10 @@ SECRET_DB_PASSWORD_VERSION=v1
|
|||
#SECRET_AUTHENTIK_ID_VERSION=v1
|
||||
#LOGIN_TYPE='auto'
|
||||
|
||||
# Allow remote connections to db
|
||||
# 🚩🚩 dangerous, use only for development sites!
|
||||
|
||||
# Allow remote connections to db
|
||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.public-db.yml
|
||||
|
||||
# Wide-open CORS
|
||||
#CORS_ALLOW_ALL=1
|
||||
|
|
2
abra.sh
2
abra.sh
|
@ -1,5 +1,5 @@
|
|||
export PHP_UPLOADS_CONF_VERSION=v3
|
||||
export ENTRYPOINT_CONF_VERSION=v3
|
||||
export ENTRYPOINT_CONF_VERSION=v4
|
||||
export ENTRYPOINT_MAILRELAY_CONF_VERSION=v2
|
||||
export MSMTP_CONF_VERSION=v3
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ services:
|
|||
WORDPRESS_DB_NAME: wordpress
|
||||
WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX:-wp_}
|
||||
PHP_EXTENSIONS: ${PHP_EXTENSIONS}
|
||||
CORS_ALLOW_ALL:
|
||||
secrets:
|
||||
- db_password
|
||||
configs:
|
||||
|
|
|
@ -7,6 +7,11 @@ docker-php-ext-install {{ env "PHP_EXTENSIONS" }}
|
|||
curl -z /usr/local/bin/wp -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
||||
chmod +x /usr/local/bin/wp
|
||||
|
||||
{{ if eq (env "CORS_ALLOW_ALL") "1" }}
|
||||
a2enmod headers
|
||||
sed -ri -e 's/^([ \t]*)(<\/VirtualHost>)/\1\tHeader set Access-Control-Allow-Origin "*"\n\1\2/g' /etc/apache2/sites-available/*.conf
|
||||
{{ end }}
|
||||
|
||||
if [ -n "$@" ]; then
|
||||
"$@"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue