PierreZ / goStatic

A really small static web server for Docker
GNU General Public License v2.0
395 stars 77 forks source link

Option to set response status #10

Open reod opened 6 years ago

reod commented 6 years ago

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

Usage of ./goStatic:
  (...)
  -status-code int
        Define response status code (default 200)
PierreZ commented 6 years ago

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.

reod commented 6 years ago

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