• Resolved supportic

    (@supportic)


    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/

    • This topic was modified 1 year, 7 months ago by supportic.
Viewing 1 replies (of 1 total)
  • Hi @supportic,

    This should be possible but it would require custom coding and editing the plugin’s files. At the moment we do not offer support for custom coding since it’s risky and we would not want to break your website by suggesting incorrect or incomplete code.

    It is possible though that someone on these forums might’ve already tried that and could help so we’ll leave the ticket open for the time being.
    Thank you for your understanding.


    Warmly,

    Mihaela


Viewing 1 replies (of 1 total)
  • The topic ‘HTTP requests in docker local dev environment’ is closed to new replies.