I'm using react as frontend with a Django rest framework as server side to provide api to the frontend. To handle the routing of the urls, react-router is used.
To handle a urls not matching any paths in the react-router, I'm using the following code:
<Route component={my404component} />
This does work but it returns status code 200, how can I return 404 instead for SEO purposes? I've heard some responses that I have to use a server, but how do I do this with a django-rest-framework? Or is this related to my nginx?