Skip to content

Commit f4ce15e

Browse files
committed
Hide header conditional behind MW_ENABLE_PROFILING_HEADER env
1 parent 0a5faa2 commit f4ce15e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ RUN set -eux; \
9999
a2enconf mediawiki
100100

101101
ARG INSTALL_PROFILING_DEPS=0
102+
ENV MW_ENABLE_PROFILING_HEADER=${INSTALL_PROFILING_DEPS}
102103
COPY install_profiling.sh /install_profiling.sh
103104
RUN if [ "$INSTALL_PROFILING_DEPS" = "1" ] ; then bash /install_profiling.sh ; else echo "skipping profiling dependencies ..." ; fi
104105

dist-persist/wbstack/src/Settings/LocalSettings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
// profiling
4848
// requires docker image to be built with dependencies
49-
if( isset ( $_SERVER['HTTP_X_WBSTACK_MW_PROFILING'] ) ) {
49+
if( getenv('MW_ENABLE_PROFILING_HEADER') === '1' && isset ( $_SERVER['HTTP_X_WBSTACK_MW_PROFILING'] ) ) {
5050
$wgProfiler['class'] = 'ProfilerXhprof';
5151
$wgProfiler['output'] = [ 'ProfilerOutputText', 'ProfilerOutputDump' ];
5252
$wgProfiler['outputDir'] = "/tmp/";

0 commit comments

Comments
 (0)