fix: bug with authorizer url
This commit is contained in:
@@ -3,14 +3,13 @@ package routes
|
||||
import (
|
||||
"github.com/authorizerdev/authorizer/server/handlers"
|
||||
"github.com/authorizerdev/authorizer/server/middlewares"
|
||||
"github.com/gin-contrib/location"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// InitRouter initializes gin router
|
||||
func InitRouter() *gin.Engine {
|
||||
router := gin.Default()
|
||||
router.Use(location.Default())
|
||||
// router.Use(location.Default())
|
||||
router.Use(middlewares.GinContextToContextMiddleware())
|
||||
router.Use(middlewares.CORSMiddleware())
|
||||
|
||||
@@ -25,14 +24,16 @@ func InitRouter() *gin.Engine {
|
||||
// login page app related routes.
|
||||
app := router.Group("/app")
|
||||
{
|
||||
app.Static("/favicon_io", "app/favicon_io")
|
||||
app.Static("/build", "app/build")
|
||||
app.GET("/", handlers.AppHandler())
|
||||
app.GET("/reset-password", handlers.AppHandler())
|
||||
app.GET("/:page", handlers.AppHandler())
|
||||
}
|
||||
|
||||
// dashboard related routes
|
||||
dashboard := router.Group("/dashboard")
|
||||
{
|
||||
dashboard.Static("/favicon_io", "dashboard/favicon_io")
|
||||
dashboard.Static("/build", "dashboard/build")
|
||||
dashboard.GET("/", handlers.DashboardHandler())
|
||||
dashboard.GET("/:page", handlers.DashboardHandler())
|
||||
|
Reference in New Issue
Block a user