cookie ready
This commit is contained in:
+8
-1
@@ -71,7 +71,13 @@ func run() error {
|
||||
customerService := pscustomer.NewService(prestaDB, cfg.PrestaShopTablePrefix)
|
||||
cartService := pscart.NewService(prestaDB, cfg.PrestaShopTablePrefix)
|
||||
routeService := psroutes.NewService(prestaDB, cfg.PrestaShopTablePrefix)
|
||||
sessionService := pssession.NewService(prestaDB, cfg.PrestaShopTablePrefix, cfg.PrestaShopVersion)
|
||||
sessionService := pssession.NewService(
|
||||
prestaDB,
|
||||
cfg.PrestaShopTablePrefix,
|
||||
cfg.PrestaShopVersion,
|
||||
cfg.PrestaShopCookieName,
|
||||
cfg.DomainCookie,
|
||||
)
|
||||
productRoute, err := routeService.LoadProductRoute(context.Background())
|
||||
if err != nil {
|
||||
return fmt.Errorf("load product route rule: %w", err)
|
||||
@@ -118,6 +124,7 @@ func run() error {
|
||||
e.Static("/dist", "web/dist")
|
||||
e.GET("/healthz", handlers.Healthz())
|
||||
e.GET("/readyz", handlers.Readyz(appStore, prestaDB, cfg.PrestaShopProxyTarget))
|
||||
e.Match([]string{http.MethodGet, http.MethodPost}, "/debug/cookie/decode", handlers.DecodeCookie(cookieCodec))
|
||||
e.GET("/*", func(c echo.Context) error {
|
||||
productMatch, productOK := productRoute.MatchInfo(c.Request().URL.Path)
|
||||
categoryMatch, categoryOK := categoryRoute.MatchInfo(c.Request().URL.Path)
|
||||
|
||||
Reference in New Issue
Block a user