forked from rojo-rbx/rojo
Support explicitly specifying http or https protocol in plugin (#642)
* Support explicitly specifying http or https protocol in plugin * Fix incorrect format string Port is not a number
This commit is contained in:
@@ -202,7 +202,9 @@ function App:startSession()
|
||||
twoWaySync = Settings:get("twoWaySync"),
|
||||
}
|
||||
|
||||
local baseUrl = ("http://%s:%s"):format(host, port)
|
||||
local baseUrl = if string.find(host, "^https?://")
|
||||
then string.format("%s:%s", host, port)
|
||||
else string.format("http://%s:%s", host, port)
|
||||
local apiContext = ApiContext.new(baseUrl)
|
||||
|
||||
local serveSession = ServeSession.new({
|
||||
|
||||
Reference in New Issue
Block a user