Inject thumbnails in DASH (#15)

* [Test] inject thumbnails in DASH

* Address wrong storyboard hight

* Better dash

* Feature flag it for now

* Add a small safety check and some comments

* Fix thumbnails

* Fix content type

* Fix dash router

* Remove comment

* Move function, add null check
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2022-11-29 21:24:37 -05:00
1 parent 301cfe1b82
commit 5b10696400
6 files changed
+195 -4

No files matched your search

@@ -8,6 +8,7 @@ import "pkg:/components/WebServer/Middleware/StateApiRouter.bs"
import "pkg:/components/WebServer/Middleware/CommandsApiRouter.bs"
import "pkg:/components/WebServer/Middleware/CorsMiddleware.bs"
import "pkg:/components/WebServer/Middleware/BasicAuthMiddleware.bs"
import "pkg:/components/WebServer/Middleware/DashRouter.bs"
#const WEB_SERVER_BASIC_AUTH = false
@@ -21,7 +22,7 @@ function WebServerLoop()
m.settings = new Http.HttpSettings(m.webServerPort)
' Root at www to get http://IP_ADDRESS:PORT/index.html
m.settings.WwwRoot = "pkg:/www"
m.settings.Timeout = 5000
m.settings.Timeout = 2000
m.server = new Http.HttpServer(m.settings, m)
homeRouter = new Http.HttpRouter()
@@ -33,6 +34,7 @@ function WebServerLoop()
m.server.UseRouter(new Http.CorsMiddleware(`http://${GetLocalIpAddress()}:8888`))
m.server.UseRouter(homeRouter)
m.server.UseRouter(new Http.DashRouter())
m.server.UseRouter(new Http.CommandsApiRouter())
m.server.UseRouter(new Http.StateApiRouter())
m.server.UseRouter(new Http.InvidiousRouter())