diff --git a/backend/src/main/java/io/papermc/hangar/service/ValidationService.java b/backend/src/main/java/io/papermc/hangar/service/ValidationService.java index 224f79e7..ca7b1140 100644 --- a/backend/src/main/java/io/papermc/hangar/service/ValidationService.java +++ b/backend/src/main/java/io/papermc/hangar/service/ValidationService.java @@ -14,7 +14,7 @@ public class ValidationService { private static final Set 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) { diff --git a/frontend/src/server/routes/prism/[...].ts b/frontend/src/server/routes/prism/[...].ts new file mode 100644 index 00000000..531a202f --- /dev/null +++ b/frontend/src/server/routes/prism/[...].ts @@ -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", "")}`; +});