aboutsummaryrefslogtreecommitdiff
path: root/application_router.go
diff options
context:
space:
mode:
authorEmiliano Ciavatta2020-09-30 20:58:05 +0000
committerEmiliano Ciavatta2020-09-30 20:58:05 +0000
commit55afd62a8cfe2cde6e627f1905ab8fe77965afd6 (patch)
tree57545a722a62d2279bfcd2e36f1cbd1da5a5736a /application_router.go
parent4cfdf6e2dfe9184e988a145495e072571d512cdc (diff)
parentd6e2aaad41f916c2080c59cf7b4e42bf87a1a03f (diff)
Merge branch 'feature/frontend' into develop
Diffstat (limited to 'application_router.go')
-rw-r--r--application_router.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/application_router.go b/application_router.go
index 852e68b..501956b 100644
--- a/application_router.go
+++ b/application_router.go
@@ -20,9 +20,12 @@ func CreateApplicationRouter(applicationContext *ApplicationContext) *gin.Engine
router.MaxMultipartMemory = 8 << 30
router.Use(static.Serve("/", static.LocalFile("./frontend/build", true)))
- router.GET("/connections/:id", func(c *gin.Context) {
- c.File("./frontend/build/index.html")
- })
+
+ for _, path := range []string{"/connections/:id", "/pcaps", "/rules", "/services", "/config"} {
+ router.GET(path, func(c *gin.Context) {
+ c.File("./frontend/build/index.html")
+ })
+ }
router.POST("/setup", func(c *gin.Context) {
if applicationContext.IsConfigured {