To kill some mixed content warnings on our…

To kill some mixed content warnings on our Trac instances, we will need to serve some resources (such as http://static.afterthedeadline.com) over SSL. To do so, we need to detect the protocol inside Trac’s templating language. I’ve figured this out pretty easily locally, but depending on our setup (the web server, load balancers, what have you) the variable (the equivalent of $_SERVER) may be different. And it doesn’t make sense for me to ask for a series of deploys of the trac environs while I play a guessing game.

So, this line of code will provide the raw output I need:

<div py:if="'TRAC_ADMIN' in perm(resource)" py:for="item in sorted(req.environ.keys())">${item}: ${repr(req.environ[item])}</div>

Can this be put into production for a moment, with the output then copied and emailed to me?

To put it in production: Add it to the end of site.htmlHTML HTML is an acronym for Hyper Text Markup Language. It is a markup language that is used in the development of web pages and websites. file on a TracTrac Trac is the place where contributors create issues for bugs or feature requests much like GitHub.https://core.trac.wordpress.org/. instance on wp.org, immediately before the closing tags. The output will appear in the footer of every page, and only if you are logged in as a Trac admin.

I am happy to limit this to my username and then commit and ask for a deployDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. — that is also fine. Just want to be clear what my intentions are.

#request, #trac