mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
Updates across the board to the caddy and other configs.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.3/socket.io.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.3/socket.io.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// set-up a connection between the client and the server
|
// set-up a connection between the client and the server
|
||||||
var socket = io.connect('http://ftb-infinity.snipanet.com:8001/');
|
var socket = io.connect('http://ftb-infinity.snipanet.com/');
|
||||||
|
|
||||||
// let's assume that the client page, once rendered, knows what room it wants to join
|
// let's assume that the client page, once rendered, knows what room it wants to join
|
||||||
var room = "pool_stats";
|
var room = "pool_stats";
|
||||||
|
|||||||
@@ -5,8 +5,11 @@
|
|||||||
proxy /api 127.0.0.1:8001 {
|
proxy /api 127.0.0.1:8001 {
|
||||||
without /api
|
without /api
|
||||||
}
|
}
|
||||||
|
proxy /socket.io 127.0.0.1:8001 {
|
||||||
|
header_upstream Connection {>Connection}
|
||||||
|
header_upstream Upgrade {>Upgrade}
|
||||||
|
}
|
||||||
header / {
|
header / {
|
||||||
Access-Control-Allow-Origin *
|
|
||||||
Access-Control-Allow-Methods "GET, POST, OPTIONS"
|
Access-Control-Allow-Methods "GET, POST, OPTIONS"
|
||||||
Access-Control-Allow-Headers "Content-Type, x-access-token"
|
Access-Control-Allow-Headers "Content-Type, x-access-token"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ if(global.config.solo.enable === true){
|
|||||||
pool_list.push('solo');
|
pool_list.push('solo');
|
||||||
}
|
}
|
||||||
|
|
||||||
app.use(cors());
|
app.use(cors({origin: true}));
|
||||||
app.use(bodyParser.urlencoded({extended: false}));
|
app.use(bodyParser.urlencoded({extended: false}));
|
||||||
app.use(bodyParser.json());
|
app.use(bodyParser.json());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user