simonh1000/angular-http-server

Ability to add custom headers

jtdatjbh opened this issue · 2 comments

I'd like to make sure that the browser does not cache any responses sent from the server. As such, I would propose adding --header command line arguments that would allow a user to include a Cache-Control : no-cache header, i.e.

angular-http-server --header Cache-Control:no-cache --header X-Powered-By:angular-http-server

Thoughts?

This is a development only server, so chances are you also have the browser dev console open at the same time? That has an option to disable caching already built in

Understood. I'm using this server for cypress testing and I was looking to clue cypress in that nothing should be cached. From what I can tell, there isn't a way to clear cypress' browser cache, so I was looking for a way to let the server tell whichever browser was accessing the content not to use cache for anything.

Also, I figured it might be useful to allow anyone to include whichever headers they want for debugging purposes (i.e. multiple services are running locally).