move common static files, 503 on unavailable services
This commit is contained in:
parent
7b92f97b24
commit
b2485eda79
47 changed files with 36 additions and 9 deletions
|
|
@ -178,8 +178,8 @@ func New(ctx context.Context, opts ServiceOptions) (*Service, error) {
|
|||
|
||||
func (srv *Service) BindRoutes(group *gin.RouterGroup) {
|
||||
group.GET("/public/*path", func(ctx *gin.Context) {
|
||||
path := strings.TrimPrefix(ctx.Request.URL.Path, "/twitch/")
|
||||
http.ServeFileFS(ctx.Writer, ctx.Request, publicFS, path)
|
||||
filepath := strings.TrimPrefix(ctx.Request.URL.Path, "/twitch/")
|
||||
http.ServeFileFS(ctx.Writer, ctx.Request, publicFS, filepath)
|
||||
})
|
||||
|
||||
group.GET("/login", func(ctx *gin.Context) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue