Browse Source

Change socket.io path to /wetty/socket.io

pull/34/head
Jarrett Gilliam 9 years ago
parent
commit
a595fb82f1
  1. 12
      README.md
  2. 2
      app.js
  3. 2
      public/index.html
  4. 2
      public/wetty/index.html
  5. 2
      public/wetty/wetty.js

12
README.md

@ -69,18 +69,6 @@ Put the following configuration in nginx's conf:
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true; proxy_set_header X-NginX-Proxy true;
} }
location /socket.io {
proxy_pass http://127.0.0.1:3000/socket.io;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 43200000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
}
If you are running `app.js` as `root` and have an Nginx proxy you have to use: If you are running `app.js` as `root` and have an Nginx proxy you have to use:

2
app.js

@ -90,7 +90,7 @@ if (runhttps) {
}); });
} }
var io = server(httpserv); var io = server(httpserv,{path: '/wetty/socket.io'});
io.on('connection', function(socket){ io.on('connection', function(socket){
var sshuser = ''; var sshuser = '';
var request = socket.request; var request = socket.request;

2
public/index.html

@ -5,7 +5,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Wetty - The WebTTY Terminal Emulator</title> <title>Wetty - The WebTTY Terminal Emulator</title>
<script src="/wetty/hterm_all.js"></script> <script src="/wetty/hterm_all.js"></script>
<script src="/socket.io/socket.io.js"></script> <script src="/wetty/socket.io/socket.io.js"></script>
<script src="/wetty/wetty.js"></script> <script src="/wetty/wetty.js"></script>
<style> <style>
html, html,

2
public/wetty/index.html

@ -5,7 +5,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Wetty - The WebTTY Terminal Emulator</title> <title>Wetty - The WebTTY Terminal Emulator</title>
<script src="/wetty/hterm_all.js"></script> <script src="/wetty/hterm_all.js"></script>
<script src="/socket.io/socket.io.js"></script> <script src="/wetty/socket.io/socket.io.js"></script>
<script src="/wetty/wetty.js"></script> <script src="/wetty/wetty.js"></script>
<style> <style>
html, html,

2
public/wetty/wetty.js

@ -1,5 +1,5 @@
var term; var term;
var socket = io(location.origin) var socket = io(location.origin, {path: '/wetty/socket.io'})
var buf = ''; var buf = '';
function Wetty(argv) { function Wetty(argv) {

Loading…
Cancel
Save