mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-11-27 06:01:08 +08:00
chore: catch missing prism langs
This commit is contained in:
parent
a691b78ff7
commit
c711112fd5
@ -14,7 +14,7 @@ public class ValidationService {
|
|||||||
|
|
||||||
private static final Set<String> BANNED_ROUTES = Set.of("actuator", "admin", "api", "api-docs", "authors", "guidelines", "linkout",
|
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",
|
"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;
|
private final HangarConfig config;
|
||||||
|
|
||||||
public ValidationService(final HangarConfig config) {
|
public ValidationService(final HangarConfig config) {
|
||||||
|
5
frontend/src/server/routes/prism/[...].ts
Normal file
5
frontend/src/server/routes/prism/[...].ts
Normal 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", "")}`;
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user