Skip to content

Commit

Permalink
Fix: basepath as default page issue with search parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
corporateuser authored Feb 12, 2024
1 parent e7efd9b commit a72f5c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export class cds_launchpad_plugin{

// Mount path for launchpad page
router.use(mount, async (request: express.Request, response: express.Response, next) => {
if(request.originalUrl.startsWith(options.basePath)) {
const originalUrl = new URL(request.originalUrl, `${request.protocol}://${request.hostname}`);
if (originalUrl.pathname === options.basePath) {
response.send(await this.prepareTemplate(options));
} else {
next();
Expand Down

0 comments on commit a72f5c2

Please sign in to comment.