mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
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:
parent
003abe86bb
commit
96cb1ee3fd
1 changed files with 3 additions and 1 deletions
|
|
@ -202,7 +202,9 @@ function App:startSession()
|
||||||
twoWaySync = Settings:get("twoWaySync"),
|
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 apiContext = ApiContext.new(baseUrl)
|
||||||
|
|
||||||
local serveSession = ServeSession.new({
|
local serveSession = ServeSession.new({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue