UPDATE: Attempting to add authentication to .ts route (WIP, not working)
This commit is contained in:
@@ -88,8 +88,8 @@ http {
|
||||
## Cacheable HLS files, ts
|
||||
location ~ ^/stream/(.+)/(.+\.ts)$ {
|
||||
# Call backend to check permission
|
||||
auth_request /auth_stream/$1;
|
||||
alias /user_data/$1/stream/$2;
|
||||
auth_request http://web_server:5000/stream/$1/direct_live_status;
|
||||
root /user_data/$1/stream/$2;
|
||||
|
||||
# Let the MPEG-TS video chunks be cacheable
|
||||
expires max;
|
||||
@@ -113,15 +113,6 @@ http {
|
||||
# The profile pictures should not be cacheable
|
||||
expires -1d;
|
||||
}
|
||||
|
||||
## Auth request for HLS
|
||||
location = /auth_stream/$1 {
|
||||
internal;
|
||||
proxy_pass http://web_server:5000/stream/$1/direct_live_status;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/\?token=.*$ {
|
||||
|
||||
Reference in New Issue
Block a user