
If we have an API service and want to publish to public, better use a reverse proxy like nginx to handle all the dirty traffic trying to taken down your services.
With Nginx you will make your API server live prosper and not minding the dirty request which should not coming on your server if not using Nginx in front of it.
So lets do the Nginx configuration for securing your backend API server.
add_header
Cache-Control public;
...