-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
So right now the viewer is opened with a link like this:
https://securityscorecards.dev/viewer/?platform=github.com&org=ossf&repo=scorecard
But it may nice to support something like one of these
- https://securityscorecards.dev/viewer/github.com/ossf/scorecard
- https://securityscorecards.dev/viewer/?uri=github.com/ossf/scorecard
The first option is something that would be done in our router config, but I wasn't able to get this working:
router: {
extendRoutes(routes, resolve) {
routes.push({
path: '/viewer/:platform/:org/:repo',
redirect: to => {
return {
path: '/viewer/',
query: {
platform: to.params.platform,
org: to.params.org,
repo: to.params.repo
}
}
},
},)
}
}
The second option could be done by modifying the static JS to include something like this somewhere:
[platform, org, repo] = params.uri.split('/')
Metadata
Metadata
Assignees
Labels
No labels