[PR #153] [MERGED] Support for M3U with reverse proxy and https #396

Closed
opened 2026-03-15 03:31:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/asapach/peerflix-server/pull/153
Author: @costan1974
Created: 9/14/2018
Status: Merged
Merged: 9/18/2018
Merged by: @asapach

Base: masterHead: master


📝 Commits (3)

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 server/index.js (+3 -1)

📄 Description

When downloading M3U files, if the reverse proxy exposes https, the generated URL is exporting the wrong protocol.
This change checks for x-forwarded-proto in the original request and creates the M3U list with the proxy reported protocol.

To allow for this to work with NGINX it sufficent to add the following lines:

            proxy_set_header Host $http_host;
            proxy_set_header X-Forwarded-Proto https;

The first line let peerflix know the original exposed FQDN:PORT name the client used to reach the proxy, the second header let peerflix know that request was https and not http.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/asapach/peerflix-server/pull/153 **Author:** [@costan1974](https://github.com/costan1974) **Created:** 9/14/2018 **Status:** ✅ Merged **Merged:** 9/18/2018 **Merged by:** [@asapach](https://github.com/asapach) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`ad782dd`](https://github.com/asapach/peerflix-server/commit/ad782dd6efb7d4dd96936f9d7bb9badec9be637d) Support for M3U with reverse proxy and https - [`c3dace5`](https://github.com/asapach/peerflix-server/commit/c3dace5c2c29831c274bd79aa072db968aa02664) New approach for proxy - [`e5abb0e`](https://github.com/asapach/peerflix-server/commit/e5abb0e862eb07a35c21b1b634c42cbde614c603) Fix typos ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/index.js` (+3 -1) </details> ### 📄 Description When downloading M3U files, if the reverse proxy exposes https, the generated URL is exporting the wrong protocol. This change checks for x-forwarded-proto in the original request and creates the M3U list with the proxy reported protocol. To allow for this to work with NGINX it sufficent to add the following lines: proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Proto https; The first line let peerflix know the original exposed FQDN:PORT name the client used to reach the proxy, the second header let peerflix know that request was https and not http. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 03:31:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/peerflix-server#396
No description provided.