Skip to content

Commit

Permalink
Merge branch 'develop' into issue-523-logs-location
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ocean committed Jul 18, 2024
2 parents 7edee9b + ec63e79 commit 1d31946
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ if (config.hasProvider && dbconn) {
// Singleton instance across application
const oceanNode = OceanNode.getInstance(dbconn, node, provider, indexer, config)

function removeExtraSlashes(req: any, res: any, next: any) {
req.url = req.url.replace(/\/{2,}/g, '/')
next()
}

if (config.hasHttp) {
// allow up to 25Mb file upload
app.use(express.raw({ limit: '25mb' }))
Expand Down Expand Up @@ -153,7 +158,7 @@ if (config.hasHttp) {
})

// Integrate static file serving middleware

app.use(removeExtraSlashes)
app.use('/', httpRoutes)

app.listen(config.httpPort, () => {
Expand Down

0 comments on commit 1d31946

Please sign in to comment.