mirror of
https://github.com/edumeet/edumeet.git
synced 2026-07-24 03:17:53 +00:00
Add a try catch around lti url parsing
This commit is contained in:
parent
aa678d03e8
commit
dd09a60880
1 changed files with 10 additions and 1 deletions
|
|
@ -421,7 +421,16 @@ async function runHttpsServer()
|
|||
{
|
||||
if (req.secure || config.httpOnly)
|
||||
{
|
||||
const ltiURL = new URL(`${req.protocol }://${ req.get('host') }${req.originalUrl}`);
|
||||
let ltiURL;
|
||||
|
||||
try
|
||||
{
|
||||
ltiURL = new URL(`${req.protocol }://${ req.get('host') }${req.originalUrl}`);
|
||||
}
|
||||
catch (error)
|
||||
{
|
||||
logger.error('Error parsing LTI url: %o', error);
|
||||
}
|
||||
|
||||
if (
|
||||
req.isAuthenticated &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue