chore: remove usage of cdn-raw (#7405)

This commit is contained in:
Michael H.
2026-09-02 02:03:02 +02:00
committed by GitHub
parent 1d1c50c788
commit ec5824331e
22 changed files with 63 additions and 79 deletions
@@ -9,7 +9,7 @@
font-style: normal;
font-display: swap;
font-weight: 400;
src: url('https://cdn-raw.modrinth.com/fonts/minecraft/regular.otf') format('opentype');
src: url('https://cdn.modrinth.com/fonts/minecraft/regular.otf') format('opentype');
}
@font-face {
@@ -17,7 +17,7 @@
font-style: italic;
font-display: swap;
font-weight: 400;
src: url('https://cdn-raw.modrinth.com/fonts/minecraft/italic.otf') format('opentype');
src: url('https://cdn.modrinth.com/fonts/minecraft/italic.otf') format('opentype');
}
@font-face {
@@ -25,7 +25,7 @@
font-style: normal;
font-display: swap;
font-weight: 600;
src: url('https://cdn-raw.modrinth.com/fonts/minecraft/bold.otf') format('opentype');
src: url('https://cdn.modrinth.com/fonts/minecraft/bold.otf') format('opentype');
}
@font-face {
@@ -33,7 +33,7 @@
font-style: italic;
font-display: swap;
font-weight: 600;
src: url('https://cdn-raw.modrinth.com/fonts/minecraft/bold-italic.otf') format('opentype');
src: url('https://cdn.modrinth.com/fonts/minecraft/bold-italic.otf') format('opentype');
}
.font-minecraft {
@@ -39,12 +39,12 @@ function updateAdPosition() {
class="flex max-h-[250px] min-h-[250px] min-w-[300px] max-w-[300px] flex-col gap-4 rounded-[inherit]"
>
<img
src="https://cdn-raw.modrinth.com/modrinth-hosting-medal-light.webp"
src="https://cdn.modrinth.com/modrinth-hosting-medal-light.webp"
alt="Host your next server with Modrinth Hosting"
class="hidden light-image rounded-[inherit]"
/>
<img
src="https://cdn-raw.modrinth.com/modrinth-hosting-medal-dark.webp"
src="https://cdn.modrinth.com/modrinth-hosting-medal-dark.webp"
alt="Host your next server with Modrinth Hosting"
class="dark-image rounded-[inherit]"
/>
+5 -21
View File
@@ -12,12 +12,7 @@
"copyright": "",
"targets": "all",
"externalBin": [],
"icon": [
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"icon": ["icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
"windows": {
"nsis": {
"installMode": "currentUser",
@@ -55,9 +50,7 @@
},
"fileAssociations": [
{
"ext": [
"mrpack"
],
"ext": ["mrpack"],
"mimeType": "application/x-modrinth-modpack+zip"
}
]
@@ -69,9 +62,7 @@
"plugins": {
"deep-link": {
"desktop": {
"schemes": [
"modrinth"
]
"schemes": ["modrinth"]
},
"mobile": []
}
@@ -108,18 +99,11 @@
],
"enable": true
},
"capabilities": [
"ads",
"core",
"plugins"
],
"capabilities": ["ads", "core", "plugins"],
"csp": {
"default-src": "'self' customprotocol: asset:",
"connect-src": "ipc: http://ipc.localhost https://modrinth.com https://*.modrinth.com https://*.nodes.modrinth.com https://*.posthog.com https://posthog.modrinth.com https://*.sentry.io https://api.mclo.gs http://textures.minecraft.net https://textures.minecraft.net https://js.stripe.com https://*.stripe.com wss://*.stripe.com https://*.intercom.io wss://*.intercom.io https://*.intercomcdn.com https://www.intercom-reporting.com https://app.getsentry.com wss://*.nodes.modrinth.com https://*.taila228c5.ts.net https://*.taila228c5.ts.net wss://*.taila228c5.ts.net https://fill.papermc.io https://api.purpurmc.org 'self' data: blob:",
"font-src": [
"https://cdn-raw.modrinth.com/fonts/",
"https://js.intercomcdn.com"
],
"font-src": ["https://cdn.modrinth.com/fonts/", "https://js.intercomcdn.com"],
"img-src": "https: 'unsafe-inline' 'self' asset: http://asset.localhost http://textures.minecraft.net blob: data:",
"style-src": "'unsafe-inline' 'self'",
"script-src": "https://*.posthog.com https://posthog.modrinth.com https://js.stripe.com https://widget.intercom.io https://js.intercomcdn.com https://tally.so/widgets/embed.js 'self'",
+1 -1
View File
@@ -38,7 +38,7 @@ export default defineNuxtConfig({
...preloadedFonts.map((font): object => {
return {
rel: 'preload',
href: `https://cdn-raw.modrinth.com/fonts/${font}?v=3.19`,
href: `https://cdn.modrinth.com/fonts/${font}?v=3.19`,
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous',
@@ -62,14 +62,14 @@ useHead({
const AD_PRESETS = {
medal: {
light: 'https://cdn-raw.modrinth.com/modrinth-hosting-medal-light.webp',
dark: 'https://cdn-raw.modrinth.com/modrinth-hosting-medal-dark.webp',
light: 'https://cdn.modrinth.com/modrinth-hosting-medal-light.webp',
dark: 'https://cdn.modrinth.com/modrinth-hosting-medal-dark.webp',
description: 'Host your next server with Modrinth Hosting',
link: '/hosting?plan&ref=medal',
},
'modrinth-hosting': {
light: 'https://cdn-raw.modrinth.com/modrinth-hosting-light.webp',
dark: 'https://cdn-raw.modrinth.com/modrinth-hosting-dark.webp',
light: 'https://cdn.modrinth.com/modrinth-hosting-light.webp',
dark: 'https://cdn.modrinth.com/modrinth-hosting-dark.webp',
description: 'Host your next server with Modrinth Hosting',
link: '/hosting',
},
+2 -2
View File
@@ -2073,8 +2073,8 @@ if (!route.name.startsWith('type-project-settings')) {
ogDescription: () => project.value?.description ?? PROJECT_NOT_FOUND_DESCRIPTION,
ogImage: () =>
project.value
? (project.value?.icon_url ?? 'https://cdn-raw.modrinth.com/placeholder-square.png')
: 'https://cdn-raw.modrinth.com/not-found.png',
? (project.value?.icon_url ?? 'https://cdn.modrinth.com/placeholder-square.png')
: 'https://cdn.modrinth.com/not-found.png',
ogUrl: createCanonicalUrl,
robots: () => (project.value?.status === 'approved' ? 'all' : 'noindex'),
})
+6 -6
View File
@@ -559,7 +559,7 @@ useSeoMeta({
{{ formatMessage(messages.moreDownloadOptions) }}
</Button>
</div>
<img src="https://cdn-raw.modrinth.com/app-landing/app-screenshot.webp" alt="" />
<img src="https://cdn.modrinth.com/app-landing/app-screenshot.webp" alt="" />
<div class="bottom-transition" />
</div>
<div class="features">
@@ -617,12 +617,12 @@ useSeoMeta({
<p>{{ formatMessage(messages.playWithFavoriteModsDescription) }}</p>
</div>
<img
src="https://cdn-raw.modrinth.com/app-landing/cobblemon-launcher.webp"
src="https://cdn.modrinth.com/app-landing/cobblemon-launcher.webp"
:alt="formatMessage(messages.appScreenshotAlt)"
class="launcher"
/>
<img
src="https://cdn-raw.modrinth.com/app-landing/cobblemon.webp"
src="https://cdn.modrinth.com/app-landing/cobblemon.webp"
:alt="formatMessage(messages.minecraftScreenshotAlt)"
class="minecraft"
/>
@@ -1205,8 +1205,8 @@ useSeoMeta({
<style scoped lang="scss">
.landing-hero {
position: relative;
background: #0f1121 url('https://cdn-raw.modrinth.com/app-landing/cube-black.png') no-repeat
center 4rem;
background: #0f1121 url('https://cdn.modrinth.com/app-landing/cube-black.png') no-repeat center
4rem;
background-size: cover;
padding: 6rem 1rem 12rem 1rem;
margin-top: -5rem;
@@ -2376,7 +2376,7 @@ useSeoMeta({
}
.landing-hero {
background: url('https://cdn-raw.modrinth.com/app-landing/cube-light.png') no-repeat center 4rem;
background: url('https://cdn.modrinth.com/app-landing/cube-light.png') no-repeat center 4rem;
background-size: cover;
}
@@ -736,7 +736,7 @@ watch(
}),
ogTitle: formatMessage(messages.collectionTitle, { name: col.name }),
ogDescription: col.description,
ogImage: col.icon_url ?? 'https://cdn-raw.modrinth.com/placeholder-square.png',
ogImage: col.icon_url ?? 'https://cdn.modrinth.com/placeholder-square.png',
ogUrl: canonicalUrl,
robots: col.status === 'listed' && hasPublicProjects ? 'all' : 'noindex',
})
@@ -166,7 +166,7 @@ onMounted(() => {
to="/organization/modrinth"
class="inline-flex items-center gap-1 font-semibold hover:underline hover:brightness-[--hover-brightness]"
>
<Avatar src="https://cdn-raw.modrinth.com/modrinth-icon-96.webp" size="24px" />
<Avatar src="https://cdn.modrinth.com/modrinth-icon-96.webp" size="24px" />
Modrinth Team
</nuxt-link>
</template>
@@ -396,7 +396,7 @@ watch(
description,
ogTitle: title,
ogDescription: org.description,
ogImage: org.icon_url ?? 'https://cdn-raw.modrinth.com/placeholder-square.png',
ogImage: org.icon_url ?? 'https://cdn.modrinth.com/placeholder-square.png',
ogUrl: canonicalUrl,
})
useHead({
+2 -2
View File
@@ -111,8 +111,8 @@ useSeoMeta({
ogDescription: () => description.value,
ogImage: () =>
prefetchedUser
? (prefetchedUser?.avatar_url ?? 'https://cdn-raw.modrinth.com/placeholder-circle.png')
: 'https://cdn-raw.modrinth.com/not-found-circle.png',
? (prefetchedUser?.avatar_url ?? 'https://cdn.modrinth.com/placeholder-circle.png')
: 'https://cdn.modrinth.com/not-found-circle.png',
})
const projectCreateModal = ref<InstanceType<typeof ProjectCreateModal> | null>(null)
@@ -26,7 +26,7 @@ import StyledEmail from '../shared/StyledEmail.vue'
width="20"
height="20"
alt="Time icon"
src="https://cdn-raw.modrinth.com/email/earth.png"
src="https://cdn.modrinth.com/email/earth.png"
/>
</Column>
<Column>
@@ -41,7 +41,7 @@ import StyledEmail from '../shared/StyledEmail.vue'
width="20"
height="20"
alt="Time icon"
src="https://cdn-raw.modrinth.com/email/monitor-smartphone.png"
src="https://cdn.modrinth.com/email/monitor-smartphone.png"
/>
</Column>
<Column>
@@ -56,7 +56,7 @@ import StyledEmail from '../shared/StyledEmail.vue'
width="20"
height="20"
alt="Time icon"
src="https://cdn-raw.modrinth.com/email/clock.png"
src="https://cdn.modrinth.com/email/clock.png"
/>
</Column>
<Column>
@@ -19,37 +19,37 @@ const socialLinks = Object.freeze<readonly SocialLink[]>([
{
href: 'https://discord.modrinth.com',
alt: 'Discord',
src: 'https://cdn-raw.modrinth.com/email/discord.png',
src: 'https://cdn.modrinth.com/email/discord.png',
},
{
href: 'https://bsky.app/profile/modrinth.com',
alt: 'Bluesky',
src: 'https://cdn-raw.modrinth.com/email/bluesky.png',
src: 'https://cdn.modrinth.com/email/bluesky.png',
},
{
href: 'https://floss.social/@modrinth',
alt: 'Mastodon',
src: 'https://cdn-raw.modrinth.com/email/mastodon.png',
src: 'https://cdn.modrinth.com/email/mastodon.png',
},
{
href: 'https://x.com/modrinth',
alt: 'X (Twitter)',
src: 'https://cdn-raw.modrinth.com/email/x.png',
src: 'https://cdn.modrinth.com/email/x.png',
},
{
href: 'https://www.instagram.com/modrinth/',
alt: 'Instagram',
src: 'https://cdn-raw.modrinth.com/email/instagram.png',
src: 'https://cdn.modrinth.com/email/instagram.png',
},
{
href: 'https://www.youtube.com/@modrinth',
alt: 'YouTube',
src: 'https://cdn-raw.modrinth.com/email/youtube.png',
src: 'https://cdn.modrinth.com/email/youtube.png',
},
{
href: 'https://github.com/modrinth',
alt: 'GitHub',
src: 'https://cdn-raw.modrinth.com/email/github.png',
src: 'https://cdn.modrinth.com/email/github.png',
},
])
</script>
+2 -2
View File
@@ -353,7 +353,7 @@ pub async fn send_slack_project_webhook(
"elements": [
{
"type": "image",
"image_url": "https://cdn-raw.modrinth.com/modrinth-new.png",
"image_url": "https://cdn.modrinth.com/modrinth-new.png",
"alt_text": "Author"
},
{
@@ -492,7 +492,7 @@ pub async fn send_discord_webhook(
footer: Some(DiscordEmbedFooter {
text: format!("{} on Modrinth", project.display_project_type),
icon_url: Some(
"https://cdn-raw.modrinth.com/modrinth-new.png".to_string(),
"https://cdn.modrinth.com/modrinth-new.png".to_string(),
),
}),
};
+10 -10
View File
@@ -4,8 +4,8 @@
font-weight: 400;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Regular.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Regular.woff?v=3.19') format('woff');
url('https://cdn.modrinth.com/fonts/inter/Inter-Regular.woff2?v=3.19') format('woff2'),
url('https://cdn.modrinth.com/fonts/inter/Inter-Regular.woff?v=3.19') format('woff');
}
@font-face {
font-family: inter;
@@ -13,8 +13,8 @@
font-weight: 500;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Medium.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Medium.woff?v=3.19') format('woff');
url('https://cdn.modrinth.com/fonts/inter/Inter-Medium.woff2?v=3.19') format('woff2'),
url('https://cdn.modrinth.com/fonts/inter/Inter-Medium.woff?v=3.19') format('woff');
}
@font-face {
font-family: inter;
@@ -22,8 +22,8 @@
font-weight: 600;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-SemiBold.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-SemiBold.woff?v=3.19') format('woff');
url('https://cdn.modrinth.com/fonts/inter/Inter-SemiBold.woff2?v=3.19') format('woff2'),
url('https://cdn.modrinth.com/fonts/inter/Inter-SemiBold.woff?v=3.19') format('woff');
}
@font-face {
font-family: inter;
@@ -31,8 +31,8 @@
font-weight: 700;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Bold.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Bold.woff?v=3.19') format('woff');
url('https://cdn.modrinth.com/fonts/inter/Inter-Bold.woff2?v=3.19') format('woff2'),
url('https://cdn.modrinth.com/fonts/inter/Inter-Bold.woff?v=3.19') format('woff');
}
@font-face {
font-family: inter;
@@ -40,6 +40,6 @@
font-weight: 800;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-ExtraBold.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-ExtraBold.woff?v=3.19') format('woff');
url('https://cdn.modrinth.com/fonts/inter/Inter-ExtraBold.woff2?v=3.19') format('woff2'),
url('https://cdn.modrinth.com/fonts/inter/Inter-ExtraBold.woff?v=3.19') format('woff');
}
@@ -29,7 +29,7 @@ The primary file is explicitly listed at the top and separate from any supplemen
<div class="video-wrapper mb-8">
<video autoplay loop muted playsinline>
<source src="https://cdn-raw.modrinth.com/blog/streamlined-version-creation/vid1.mp4" type="video/mp4" />
<source src="https://cdn.modrinth.com/blog/streamlined-version-creation/vid1.mp4" type="video/mp4" />
</video>
</div>
@@ -47,7 +47,7 @@ Weve added a refreshed loader selection screen that groups loaders by project
<div class="video-wrapper mb-8">
<video autoplay loop muted playsinline>
<source src="https://cdn-raw.modrinth.com/blog/streamlined-version-creation/vid2.mp4" type="video/mp4" />
<source src="https://cdn.modrinth.com/blog/streamlined-version-creation/vid2.mp4" type="video/mp4" />
</video>
</div>
@@ -57,7 +57,7 @@ Game versions now have their own dedicated step. This was a major pain point for
<div class="video-wrapper mb-8">
<video autoplay loop muted playsinline>
<source src="https://cdn-raw.modrinth.com/blog/streamlined-version-creation/vid3.mp4" type="video/mp4" />
<source src="https://cdn.modrinth.com/blog/streamlined-version-creation/vid3.mp4" type="video/mp4" />
</video>
</div>
@@ -73,7 +73,7 @@ Dependencies were another pain point, so weve added the ability to search pro
<div class="video-wrapper mb-8">
<video autoplay loop muted playsinline>
<source src="https://cdn-raw.modrinth.com/blog/streamlined-version-creation/vid4.mp4" type="video/mp4" />
<source src="https://cdn.modrinth.com/blog/streamlined-version-creation/vid4.mp4" type="video/mp4" />
</video>
</div>
+1 -1
View File
@@ -3513,7 +3513,7 @@ const VERSIONS: VersionEntry[] = [
body: `### Improvements
- The report form has been updated to walk you through the report process better and clarify some things like that the form is for Modrinth rules and terms violations, not for bug reports or DMCA takedowns.
![A screenshot of the new report form on Modrinth, using Iris Shaders as an example. The title says "Report Iris Shaders to moderators". Below that, it says "Please report violations of Modrinth Rules or Terms of Use. Examples include malicious, spam, offensive, deceptive, misleading, and illegal content. This form is not for bug reports or DMCA takedowns (See our Copyright Policy)." Then, there is a form that asks "Which of Modrinth's rules is this project violating?" with many options: Spam, Reuploaded work, Inappropriate, Malicious, Name-squatting, Poor description, Invalid metadata, Other. Reuploaded work is selected. Below that, is a note in an orange box with a warning icon: "Please note that you are *not* submitting a DMCA takedown request, but rather a report of reuploaded content. If you meant to file a DMCA takedown request (which is a legal action) instead, please see our Copyright Policy." Then, it asks you to provide additional context, including links and images, with a text editor and a submit button at the bottom.](https://cdn-raw.modrinth.com/changelog/web/2025-02-02/reports.jpg)`,
![A screenshot of the new report form on Modrinth, using Iris Shaders as an example. The title says "Report Iris Shaders to moderators". Below that, it says "Please report violations of Modrinth Rules or Terms of Use. Examples include malicious, spam, offensive, deceptive, misleading, and illegal content. This form is not for bug reports or DMCA takedowns (See our Copyright Policy)." Then, there is a form that asks "Which of Modrinth's rules is this project violating?" with many options: Spam, Reuploaded work, Inappropriate, Malicious, Name-squatting, Poor description, Invalid metadata, Other. Reuploaded work is selected. Below that, is a note in an orange box with a warning icon: "Please note that you are *not* submitting a DMCA takedown request, but rather a report of reuploaded content. If you meant to file a DMCA takedown request (which is a legal action) instead, please see our Copyright Policy." Then, it asks you to provide additional context, including links and images, with a text editor and a submit button at the bottom.](https://cdn.modrinth.com/changelog/web/2025-02-02/reports.jpg)`,
},
{
date: `2025-01-28T19:00:00-08:00`,
@@ -21,7 +21,7 @@
/>
<img
v-else
src="https://cdn-raw.modrinth.com/landing-new/landing.webp"
src="https://cdn.modrinth.com/landing-new/landing.webp"
alt=""
class="absolute w-full h-full inset-0 object-cover object-center placeholder-banner scale-[200%]"
/>
@@ -1,12 +1,12 @@
<template>
<div class="overlay"></div>
<img
src="https://cdn-raw.modrinth.com/medal-banner-background.webp"
src="https://cdn.modrinth.com/medal-banner-background.webp"
class="background-pattern dark-pattern shadow-xl"
alt=""
/>
<img
src="https://cdn-raw.modrinth.com/medal-banner-background-light.webp"
src="https://cdn.modrinth.com/medal-banner-background-light.webp"
class="background-pattern light-pattern shadow-xl"
alt=""
/>
@@ -26,7 +26,7 @@
v-if="isDisabled"
class="relative z-10 flex size-16 items-center justify-center rounded-xl border-[1px] border-solid border-button-border bg-button-bg shadow-sm"
>
<Avatar src="https://cdn-raw.modrinth.com/medal_icon.webp" size="64px" class="opacity-50" />
<Avatar src="https://cdn.modrinth.com/medal_icon.webp" size="64px" class="opacity-50" />
<SpinnerIcon
v-if="isUpgrading"
class="size-8 animate-spin absolute text-contrast"
@@ -34,7 +34,7 @@
/>
<LockIcon v-else class="size-8 absolute" :class="{ 'opacity-50': isDisabled }" />
</div>
<Avatar v-else src="https://cdn-raw.modrinth.com/medal_icon.webp" size="64px" class="z-10" />
<Avatar v-else src="https://cdn.modrinth.com/medal_icon.webp" size="64px" class="z-10" />
<div class="z-10 ml-4 flex min-w-0 flex-col gap-1.5">
<div class="flex flex-row items-center gap-2.5">
<h2
@@ -18,7 +18,7 @@ import SelectedProjectsLeaveModal from './components/SelectedProjectsLeaveModal.
import { injectBrowseManager } from './providers/browse-manager'
import type { BrowseInstallContext } from './types'
const MEDAL_ICON_URL = 'https://cdn-raw.modrinth.com/medal_icon.webp'
const MEDAL_ICON_URL = 'https://cdn.modrinth.com/medal_icon.webp'
const router = useRouter()
const props = defineProps<{
@@ -593,7 +593,7 @@ const {
})
const serverHeaderImage = computed(() =>
serverData.value?.is_medal ? 'https://cdn-raw.modrinth.com/medal_icon.webp' : serverImage.value,
serverData.value?.is_medal ? 'https://cdn.modrinth.com/medal_icon.webp' : serverImage.value,
)
const showServerUptime = computed(() => props.showUptime && serverPowerState.value === 'running')