From f689595446ea371c3fc64a5a00302dd1dc08fe39 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Sat, 12 Oct 2013 15:48:57 +0200 Subject: [PATCH] Fix origin check for hosts with non 80 port --- app/views/asciicasts/show.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/asciicasts/show.js.erb b/app/views/asciicasts/show.js.erb index 7643b7c..7cd75b8 100644 --- a/app/views/asciicasts/show.js.erb +++ b/app/views/asciicasts/show.js.erb @@ -2,7 +2,7 @@ (function() { function receiveSize(e) { - if (e.origin === document.location.protocol + "//<%= request.host %>") { + if (e.origin === document.location.protocol + "//<%= request.host_with_port %>") { var event = e.data[0]; var data = e.data[1]; if (event == 'asciicast:size' && data.id == <%= @asciicast.id %>) {