From 6a8683ed419afd53a4741bf425bf69e23fcb38f5 Mon Sep 17 00:00:00 2001 From: Todd Blose Date: Fri, 10 Jul 2015 10:55:23 -0600 Subject: [PATCH] external UI page --- src/github.com/getlantern/flashlight/ui/ui.go | 3 ++- src/github.com/getlantern/flashlight/ui/ws.go | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/github.com/getlantern/flashlight/ui/ui.go b/src/github.com/getlantern/flashlight/ui/ui.go index 17a0818ba0..b1c3ac785c 100644 --- a/src/github.com/getlantern/flashlight/ui/ui.go +++ b/src/github.com/getlantern/flashlight/ui/ui.go @@ -28,6 +28,7 @@ var ( server *http.Server uiaddr string + extuiaddr = "http://lantern-getting-started.s3-website-us-east-1.amazonaws.com/" externalUrl = "https://www.facebook.com/manototv/" // this string is going to be changed by Makefile r = http.NewServeMux() ) @@ -96,7 +97,7 @@ func Show() { log.Error(err) return } - open.Run(uiaddr) + open.Run(extuiaddr) if externalUrl != "NO"+"_URL" { time.Sleep(4 * time.Second) open.Run(externalUrl) diff --git a/src/github.com/getlantern/flashlight/ui/ws.go b/src/github.com/getlantern/flashlight/ui/ws.go index 73fca80938..23bc2467c4 100644 --- a/src/github.com/getlantern/flashlight/ui/ws.go +++ b/src/github.com/getlantern/flashlight/ui/ws.go @@ -15,7 +15,11 @@ const ( ) var ( - upgrader = &websocket.Upgrader{ReadBufferSize: 1024, WriteBufferSize: MaxMessageSize} + upgrader = &websocket.Upgrader{ + ReadBufferSize: 1024, + WriteBufferSize: MaxMessageSize, + CheckOrigin: func(r *http.Request) bool { return true }, + } ) // UIChannel represents a data channel to/from the UI. UIChannel will have one