0

Currently I have a nginx server running in a container and want to display a static page when someone access https://example.com/showname/. The static page need to show the pod name get from the environment variable, is there a way to do this?

my env var name:deployment_env and below is static page code

<html>
    <head>
        <title>Test NGINX passed</title>
    </head>
    <body>
        <h1>deploy_env</h1>
        <h1><span id="deploy_env" style="display: block;"></span></h1>
        <script>
            var env = window.env;
            var deploy = document.querySelector('#deploy_env');
            deploy.textContent = env.deployment_env;
        </script>
    </body>
</html>
Fluke
  • 1

0 Answers0