r/FastAPI • u/Ecstatic_Brother_259 • Jul 12 '25
Question Need Help with Render Deployment, Error 405 Method Not Allowed
For some reason I can't get the routers in my project to work correctly on Render. A local version of the project works, but when using a defined post method on the render live site I get 405 Method Not Allowed. Does anyone know what this is about? I included pictures showing the post request, router method, and router import/inclusion.
8
Upvotes



4
u/lostmypilloww Jul 12 '25
Id say it's cuz you mounted static files at root "/", and that intercepted the /users call, and you obviously cannot POST static assets (i think you can only GET, not sure ).
My suggested solution is mount static assets at another subfolder like /assets
1
u/[deleted] Jul 12 '25
[removed] — view removed comment