Class FrontendController

java.lang.Object
edu.ucsb.cs156.example.controllers.FrontendController

@Profile("!development") @Controller public class FrontendController extends Object
The FrontendController is used to serve the frontend of the application. This is only enabled in the production profile, and is used to serve the frontend of the application. For development, see the FrontendProxyController.
See Also:
  • Constructor Details

    • FrontendController

      public FrontendController()
  • Method Details

    • index

      @GetMapping("/**/{path:[^\\.]*}") public String index()
      Serve home page of application
      Returns:
      the home page (via index.html)
    • csrf

      @GetMapping("/csrf") public org.springframework.http.ResponseEntity<String> csrf()
      When not in development, the CSRF endpoint is not used, so return 404
      Returns:
      response entity with 404 return code (not found)