Merge pull request #104 from darekzbik/cors_property

fix configuration values inconsistency
This commit is contained in:
Alexander Overvoorde 2020-02-12 20:18:06 +01:00 committed by GitHub
commit f9a29fb23b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -90,13 +90,13 @@ This will enable a background process that automatically downloads changes from
### Cross-origin resource sharing ### Cross-origin resource sharing
To enable the `Access-Control-Allow-Origin` header to be able to retrieve tiles from other domains, simply set the `ALLOW_CORS` variable to `1`: To enable the `Access-Control-Allow-Origin` header to be able to retrieve tiles from other domains, simply set the `ALLOW_CORS` variable to `enabled`:
``` ```
docker run \ docker run \
-p 8080:80 \ -p 8080:80 \
-v openstreetmap-data:/var/lib/postgresql/12/main \ -v openstreetmap-data:/var/lib/postgresql/12/main \
-e ALLOW_CORS=1 \ -e ALLOW_CORS=enabled \
-d overv/openstreetmap-tile-server \ -d overv/openstreetmap-tile-server \
run run
``` ```

2
run.sh
View File

@ -79,7 +79,7 @@ if [ "$1" = "run" ]; then
chown postgres:postgres /var/lib/postgresql -R chown postgres:postgres /var/lib/postgresql -R
# Configure Apache CORS # Configure Apache CORS
if [ "$ALLOW_CORS" == "1" ]; then if [ "$ALLOW_CORS" == "enabled" ]; then
echo "export APACHE_ARGUMENTS='-D ALLOW_CORS'" >> /etc/apache2/envvars echo "export APACHE_ARGUMENTS='-D ALLOW_CORS'" >> /etc/apache2/envvars
fi fi