Skip to content

Commit

Permalink
Merge pull request #13700 from transcom/revert-13592-B-20997-Add-PPTA…
Browse files Browse the repository at this point in the history
…S-under-Prime-Simulator

Revert "B 20997 add pptas under prime simulator"
  • Loading branch information
pambecker authored Sep 12, 2024
2 parents 2072292 + a6f8cbc commit c24326d
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 c24326d

Please sign in to comment.