Revert "feat: formations host 301 to moodle domain"

This reverts commit c0f9c7fe37.
This commit is contained in:
electron-rare
2026-06-11 01:59:52 +02:00
parent ab50180873
commit 4a551bcbc8
-4
View File
@@ -3,10 +3,6 @@ import { COURSES } from './config/courses';
export const onRequest = defineMiddleware((ctx, next) => {
const { pathname, searchParams } = ctx.url;
// legacy alias: the app's canonical domain is moodle.saillant.cc (SP4)
if (ctx.url.hostname === 'formations.saillant.cc') {
return ctx.redirect(`https://moodle.saillant.cc${pathname}${ctx.url.search}`, 301);
}
if (pathname === '/course/view.php') {
const id = Number(searchParams.get('id'));
const course = COURSES.find((c) => c.id === id);