package com.infoepoch.pms.agent.config;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
class SpaForwardController {

    @GetMapping({
            "/",
            "/{path:^(?!api$|auth$|assets$|favicon\\.ico$)[^\\.]*$}",
            "/{path:^(?!api$|auth$|assets$|favicon\\.ico$)[^\\.]*$}/{*subPath}"
    })
    String forwardFrontendRoute() {
        return "forward:/index.html";
    }
}
