Skip to content

Commit

Permalink
Make the 1-click-bom.tsv file accessible to the 1-click-bom extension.
Browse files Browse the repository at this point in the history
The 1-click-bom extension tries loading the `1-click-BOM.tsv` file by
`GET`ing `[...projecURL]/1-click-BOM.tsx`.
But we have the file in the processor (or later on s3) so using this
approach will let us control the actual `1-click-BOM.tsv` file URL
without re-modifying the extension.
  • Loading branch information
AbdulrhmnGhanem committed Nov 16, 2022
1 parent fdc191a commit 1276c32
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,18 @@ module.exports = async phase => {
source: '/:user/:repo/_',
destination: '/:user/:repo',
permanent: true,
}
},
// Make the 1-click-bom.tsv file accessible to the 1-click-bom extension.
{
source: '/:user/:repo/:project/1-click-BOM.tsv',
destination: `${process.env.KITSPACE_PROCESSOR_URL}/files/:user/:repo/HEAD/:project/1-click-BOM.tsv`,
permanent: true,
},
{
source: '/:user/:repo/1-click-BOM.tsv',
destination: `${process.env.KITSPACE_PROCESSOR_URL}/files/:user/:repo/HEAD/_/1-click-BOM.tsv`,
permanent: true,
},
]
},
async rewrites() {
Expand Down

0 comments on commit 1276c32

Please sign in to comment.