Skip to content

The Map Proxy

Jörn Lund edited this page Dec 23, 2024 · 2 revisions

The plugin comes with a proxy mechanism for map tiles. If enabled the Browser will load the tiles from your server rather than directly from the tile provider.

Use the proxy to hide sensitive credentials in the tile URL or for compliance with local privacy regulations like the European GDPR.

To activate the proxy for each Plugin provisder individually go to the plugin settings and check "Enable Proxy". grafik

Enable proxy mode globally by hooking into the filter acf_osm_force_proxy.

add_filter( 'acf_osm_force_proxy', '__return_true');

The proxy server lives in wp-content/maps/ and is no more than a .htaccessand a small PHP file. The configuration is saved in wp-content/uploads/acf-osm-proxy-config.php and is updated every time the settings are saved.

WP-CLI Commands

Set up the proxy server in wp-content/maps/.

wp map-proxy install

Set up the proxy server in wp-content/maps/.

wp map-proxy install --force

Remove proxy server from wp-content/maps/.

wp map-proxy uninstall

Save proxy configuration in wp-content/uploads/.

wp map-proxy configure

Multisite

In Multisites the default proxy settings (from the main blog) are saved in wp-content/maps/acf-osm-proxy-config.php. Each blog may override the settings individually in its own upload directory.

Clone this wiki locally