Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3929116
D484.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
592 B
Referenced Files
None
Subscribers
None
D484.id.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 07:42 (11 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2312052
Default Alt Text
D484.id.diff (592 B)
Attached To
Mode
D484: RFC 7239 compliant preamble script for Phabricator
Attached
Detach File
Event Timeline
Log In to Comment