HTTP requests in docker local dev environment
-
Hi,
I’m using Docker for my development environment. I have an use case where my code (php-fpm container) and my webserver (nginx container) are separated in two different containers.
The plugins is triggering HTTP requests (debug-this.php L: 199) where it’s using the host from the get_bloginfo() function.
$url = get_bloginfo( 'url' ) . '/' . $wp->request . "?$query_string";
Since my code and therefore the plugin resides in a separate container it cannot create requests to https://localhost because the webserver is in another container. In order to perform the request it would have to send these requests to: https://nginx:80 (the docker service name if its in the same network)
Is it possible to provide an environment variable to set a HOST ourselfs?
query-monitor for example also provides actions of env variables: https://querymonitor.com/docs/configuration-constants/
- The topic ‘HTTP requests in docker local dev environment’ is closed to new replies.