Skip to content

Commit

Permalink
Revert "B 20997 add pptas under prime simulator"
Browse files Browse the repository at this point in the history
  • Loading branch information
loganwc authored Sep 12, 2024
1 parent 1fd5aac commit 0733bb1
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions pkg/handlers/routing/routing_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,30 +602,6 @@ func mountPrimeSimulatorAPI(appCtx appcontext.AppContext, routingConfig *Config,
rAuth.Mount("/", api.Serve(tracingMiddleware))
})
})
site.Route("/pptas/v1", func(r chi.Router) {
r.Method("GET", "/swagger.yaml",
handlers.NewFileHandler(routingConfig.FileSystem,
routingConfig.PPTASSwaggerPath))
if routingConfig.ServeSwaggerUI {
appCtx.Logger().Info("PPTAS Simulator API Swagger UI serving is enabled")
r.Method("GET", "/docs",
handlers.NewFileHandler(routingConfig.FileSystem,
path.Join(routingConfig.BuildRoot, "swagger-ui", "pptas.html")))
} else {
r.Method("GET", "/docs", http.NotFoundHandler())
}

// Mux for prime simulator API that enforces auth
r.Route("/", func(rAuth chi.Router) {
rAuth.Use(userAuthMiddleware)
rAuth.Use(addAuditUserToRequestContextMiddleware)
rAuth.Use(authentication.PrimeSimulatorAuthorizationMiddleware(appCtx.Logger()))
rAuth.Use(middleware.NoCache())
api := pptasapi.NewPPTASAPI(routingConfig.HandlerConfig)
tracingMiddleware := middleware.OpenAPITracing(api)
rAuth.Mount("/", api.Serve(tracingMiddleware))
})
})
// Support API serves to support Prime API testing outside of production environments, hence why it is
// mounted inside the Prime sim API without client cert middleware
if routingConfig.ServeSupport {
Expand Down

0 comments on commit 0733bb1

Please sign in to comment.