goStatic icon indicating copy to clipboard operation
goStatic copied to clipboard

Option to set response status

Open reod opened this issue 7 years ago • 2 comments

200 OK is not always wanted case. It could look like:

Usage of ./goStatic:
  (...)
  -status-code int
        Define response status code (default 200)

reod avatar Feb 01 '18 13:02 reod

I'm curious about your need to have 2XX responses status codes. Are you serving files? From what I remember, serving files that exists should answer 200.

PierreZ avatar Feb 02 '18 13:02 PierreZ

I need to serve simple HTML with information about maintenance mode and status has to be 5XX, because other services (monitoring, etc.) need this.

reod avatar Feb 07 '18 08:02 reod