mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 02:12:25 -05:00
[bugfix] Fix bug where admin panel could not be accessed at /admin (#427)
* clarify comments * tidy up static serving + add /admin redirect
This commit is contained in:
parent
e306233166
commit
4b4c935e02
2 changed files with 17 additions and 12 deletions
|
|
@ -47,7 +47,7 @@ type Router interface {
|
|||
AttachMiddleware(handler gin.HandlerFunc)
|
||||
// Attach 404 NoRoute handler
|
||||
AttachNoRouteHandler(handler gin.HandlerFunc)
|
||||
// Add Gin StaticFile handler
|
||||
// Add Gin StaticFS handler
|
||||
AttachStaticFS(relativePath string, fs http.FileSystem)
|
||||
// Start the router
|
||||
Start()
|
||||
|
|
@ -62,7 +62,7 @@ type router struct {
|
|||
certManager *autocert.Manager
|
||||
}
|
||||
|
||||
// Add Gin StaticFile handler
|
||||
// Add Gin StaticFS handler
|
||||
func (r *router) AttachStaticFS(relativePath string, fs http.FileSystem) {
|
||||
r.engine.StaticFS(relativePath, fs)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue