iomega / paired-data-form

Linking mas spectra and genomic information to discover new chemistry
https://pairedomicsdata.bioinformatics.nl
Apache License 2.0
5 stars 4 forks source link

Return 404 http error when path is not /api, a file or part of router paths #174

Closed sverhoeven closed 3 years ago

sverhoeven commented 3 years ago

At the moment the server returns the index.html with 200 http code whenever the path is not /api or present in /usr/share/nginx/html. See https://github.com/iomega/paired-data-form/blob/87de9335de0a6ea89b120a89068f4ae2fac8c7ec/app/dockerfiles/nginx.default.conf#L5-L12

This can cause confusion for security scans.

It would be nicer if the web server was adapted to return index.html only when it is a React route. See https://github.com/iomega/paired-data-form/blob/master/app/src/Routes.tsx#L57-L69