mafintosh / signalhub

Simple signalling server that can be used to coordinate handshaking with webrtc or other fun stuff.
MIT License
667 stars 95 forks source link

download dialogue opens #20

Closed perguth closed 8 years ago

perguth commented 8 years ago

Running signalhub behind a reverse proxy I am now dealing with the problem that, instead of displaying the page like it should, the browsers download dialogue opens. 😟

I use the following .htaccess:

RewriteEngine On
RewriteBase /

RewriteCond %{ENV:HTTPS} !=on
RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteRule ^(.*) http://localhost:65300/$1 [P]
perguth commented 8 years ago

Adding the following line to the .htaccess solved the problem 😄:

Header set Content-Type text/plain

Note: This never was a good solution since we need the content type text/event-stream in all other cases than /.

mafintosh commented 8 years ago

I dont think we set any headers actually for the status page. You wanna PR that?

perguth commented 8 years ago

You're right. Tested it and works 🚀: https://github.com/mafintosh/signalhub/pull/21