Add ALLOW_CORS parameter

This commit is contained in:
Alexander Overvoorde
2019-08-31 13:44:23 +02:00
parent 8744ab2792
commit 451f335bc5
4 changed files with 24 additions and 1 deletions

5
run.sh
View File

@@ -69,6 +69,11 @@ if [ "$1" = "run" ]; then
# Fix postgres data privileges
chown postgres:postgres /var/lib/postgresql -R
# Configure Apache CORS
if [ "$ALLOW_CORS" == "1" ]; then
echo "export APACHE_ARGUMENTS='-D ALLOW_CORS'" >> /etc/apache2/envvars
fi
# Initialize PostgreSQL and Apache
CreatePostgressqlConfig
service postgresql start