chore: catch missing prism langs

This commit is contained in:
MiniDigger | Martin 2024-07-29 20:07:11 +02:00
parent a691b78ff7
commit c711112fd5
2 changed files with 6 additions and 1 deletions

View File

@ -14,7 +14,7 @@ public class ValidationService {
private static final Set<String> BANNED_ROUTES = Set.of("actuator", "admin", "api", "api-docs", "authors", "guidelines", "linkout",
"logged-out", "markdown", "new", "neworganization", "notifications", "null", "organizations", "privacy", "recommended", "settings",
"staff", "terms", "tools", "tos", "undefined", "unread", "version", "paper", "velocity", "waterfall", "spigot", "mojang", "minecraft", "auth", "_nuxt");
"staff", "terms", "tools", "tos", "undefined", "unread", "version", "paper", "velocity", "waterfall", "spigot", "mojang", "minecraft", "auth", "_nuxt", "prism");
private final HangarConfig config;
public ValidationService(final HangarConfig config) {

View File

@ -0,0 +1,5 @@
// to prevent unnecessary profile loads
export default defineEventHandler((event) => {
setResponseStatus(event, 404);
return `Unknown language: ${event.context?.params?._?.replace("prism-", "")?.replace(".min.js", "")}`;
});