Closed ssciolla closed 2 years ago
@ssciolla one thing I noticed is when you open CCM in it's own window and try some random URL, it not show access denied page, instead react code is loading and i see some error with Breadcrumbs missing data. I feel other than the routes described in the FeatureUIData.tsx
should be routed to default no-page found
May Be in the code below you might need add a default route?
<Breadcrumbs {...{ features, pathnames }} />
<Switch>
<Route exact={true} path='/'>
<Home globals={globals} course={course} setCourse={setCourse} getCourseError={getCourseError} />
</Route>
{features.map(feature => {
return (
<Route key={feature.data.id} path={feature.route}>
<feature.component
globals={globals}
course={course}
title={feature.data.title}
helpURLEnding={feature.data.helpURLEnding}
/>
</Route>
)
})}
<Route><div><em>Under Construction</em></div></Route>
</Switch>
May Be in the code below you might need add a default route?
@pushyamig, nice catch! This is a bug, there are stack traces related to Breadcrumbs
working on it now. I'll also add a "nothing here" page.
@pushyamig, okay, this should be fixed. Please test again.
The PR aims to resolve #48 and #209. This is somewhat experimental, but I believe it works well. I think it could help us handle some other issues, such as #253 and #312. It also is related to the closed issue #103.
Note(s):
app.useStaticAssets
to usingServeStaticModule
, which is designed for single-page-applications.ServeStaticModule
is now registered inapp.module.ts
,helmet
and its Content Security Policy (CSP) settings now apply to the static assets served. This is likely a good thing, but means we need to do more CSP configuration (included here). Without them, the iframe was getting blocked in the Canvas test instance.Switch
inclient/index.tsx
, so we can have public routes for error messages and redirect effectively to them from theserver
andclient
(see changes tolti.service.ts
andApp.tsx
).