Page MenuHomeDevCentral

D484.diff
No OneTemporary

D484.diff

diff --git a/files/opt/phabricator/support/preamble.php b/files/opt/phabricator/support/preamble.php
new file mode 100644
--- /dev/null
+++ b/files/opt/phabricator/support/preamble.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * Preamble script to play nice with a nginx reverse proxy.
+ *
+ * Shipped with Docker nasqueron/phabricator image.
+ */
+
+// We trust the answer of nginx.
+$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
+
+// Phabricator uses the HTTPS variable to determine the protocol.
+if ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
+ $_SERVER['HTTPS'] = true;
+}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 08:58 (18 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2257619
Default Alt Text
D484.diff (592 B)

Event Timeline