From 78a6aeba685e9bce2c6fad73f5861bfc78ee7876 Mon Sep 17 00:00:00 2001 From: Bryce Kahle Date: Mon, 9 Mar 2020 15:06:27 -0400 Subject: [PATCH] Update sockjs_url to latest v1 --- README.md | 6 +++--- examples/echo/index.html | 2 +- examples/echo/server.js | 4 +--- examples/express-3.x/index.html | 2 +- examples/express-3.x/server.js | 4 +--- examples/express/index.html | 2 +- examples/express/server.js | 4 +--- examples/hapi/html/index.html | 2 +- examples/hapi/server.js | 6 +----- examples/koa/index.html | 2 +- examples/koa/server.js | 3 +-- examples/multiplex/index.html | 4 ++-- examples/multiplex/server.js | 3 +-- src/sockjs.coffee | 2 +- 14 files changed, 17 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 018588ca..50262bb2 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ A simplified echo SockJS server could look more or less like: var http = require('http'); var sockjs = require('sockjs'); -var echo = sockjs.createServer({ sockjs_url: 'http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js' }); +var echo = sockjs.createServer(); echo.on('connection', function(conn) { conn.on('data', function(message) { conn.write(message); @@ -90,7 +90,7 @@ var sockjs_server = sockjs.createServer(options); Where `options` is a hash which can contain:
-
sockjs_url (string, required)
+
sockjs_url (string)
Transports which don't support cross-domain communication natively ('eventsource' to name one) use an iframe trick. A simple page is served from the SockJS server (using its foreign domain) and is @@ -99,7 +99,7 @@ Where `options` is a hash which can contain: domain local to the SockJS server. This iframe also does need to load SockJS javascript client library, and this option lets you specify its url (if you're unsure, point it to - + the latest minified SockJS client release, this is the default). You must explicitly specify this url on the server side for security reasons - we don't want the possibility of running any foreign diff --git a/examples/echo/index.html b/examples/echo/index.html index 4d739131..afd4185d 100644 --- a/examples/echo/index.html +++ b/examples/echo/index.html @@ -1,7 +1,7 @@ - +