Closed Deroswent closed 4 days ago
Hi @Deroswent,
I am not sure what is meant to be the bug here?
We serve the admin dashboard from the server on the /app path. Any request to <your_server>/app
-that isn't an actual piece of the JS bundle-will return a 200 with the empty index.html file. That file is then hydrated on the client, and from there react-router-dom
takes over making sure to route to the correct page. So if you actually went to the that URL you would see a 404 page.
Closing this as it works as expected
Package.json file
Node.js version
v20
Database and its version
PostgreSQL 16.4
Operating system name and version
WIndows 11
Browser name
No response
What happended?
I placed Medusa admin on the internet, it started to be scanned by bots for vulnerabilities and one result is unexpected. When you go to
/app/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
you get a 200 response code.I thought maybe it's my server's influence (Medusa is behind nginx). I installed the latest version of medusa 2.0.7 locally, but even when opening
http://localhost:9000/app/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
- I still get code 200, even though such file and directory doesn't exist, of course.Local server log in dev mode confirms - Medusa gives code 200.
Expected behavior
Medusa should return a 404 code
Actual behavior
Medusa returns code 200 for a non-existent URL
Link to reproduction repo
https://github.com/medusajs/medusa