Skip to content

Commit

Permalink
chore: encode uri components that are randomly generated to prevent p…
Browse files Browse the repository at this point in the history
…arsing errors
  • Loading branch information
TillaTheHun0 committed Feb 26, 2024
1 parent 506c595 commit 2586969
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ const authMiddleware =
return app;
};

const MONGO_URL = `mongodb://${env('MONGO_USERNAME')}:${env('MONGO_PASSWORD')}@${
env('MONGO_HOST')
}`;
const MONGO_URL = `mongodb://${encodeURIComponent(env('MONGO_USERNAME'))}:${
encodeURIComponent(env('MONGO_PASSWORD'))
}@${env('MONGO_HOST')}`;
const REDIS_URL = `http://${env('REDIS_HOST')}:${env('REDIS_PORT')}`;
const ELASTICSEARCH_URL = `http://${env('ELASTICSEARCH_HOST')}`;
// Use the public url, so presigned url signatures match
const MINIO_URL = `https://${env('MINIO_USERNAME')}:${env('MINIO_PASSWORD')}@${
env('MINIO_HOST')
}.onrender.com`;
const MINIO_URL = `https://${encodeURIComponent(env('MINIO_USERNAME'))}:${
encodeURIComponent(env('MINIO_PASSWORD'))
}@${env('MINIO_HOST')}.onrender.com`;

export default hyper({
app,
Expand Down

0 comments on commit 2586969

Please sign in to comment.