Add terms and policies

This commit is contained in:
2026-01-09 02:12:08 +01:00
parent a27b0bc629
commit 554fb2e6d0
7 changed files with 262 additions and 1 deletions

View File

@@ -59,7 +59,10 @@ public class SecurityConfig {
"/v3/api-docs/**",
"/swagger-ui.html",
"/swagger-ui/**",
"/channels"
"/channels",
"/terms",
"/privacy",
"/cookies"
)
.permitAll()
.requestMatchers(HttpMethod.GET, "/view/*/broadcast")

View File

@@ -76,6 +76,27 @@ public class ViewController {
return "channels";
}
@org.springframework.web.bind.annotation.GetMapping("/terms")
public String termsOfUse(Model model) {
LOG.info("Rendering terms of use");
addVersionAttributes(model);
return "terms";
}
@org.springframework.web.bind.annotation.GetMapping("/privacy")
public String privacyPolicy(Model model) {
LOG.info("Rendering privacy policy");
addVersionAttributes(model);
return "privacy";
}
@org.springframework.web.bind.annotation.GetMapping("/cookies")
public String cookiePolicy(Model model) {
LOG.info("Rendering cookie policy");
addVersionAttributes(model);
return "cookies";
}
@org.springframework.web.bind.annotation.GetMapping("/settings")
public String settingsView(OAuth2AuthenticationToken oauthToken, Model model) {
String sessionUsername = OauthSessionUser.from(oauthToken).login();