Revert "feat: formations host 301 to moodle domain"
This reverts commit c0f9c7fe37.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user