4 Commits (3b715b37535f5bb6c96ce6f29a0f3fb1cf9149d6)

Author SHA1 Message Date
Buddy Sandidge 3edb2ed2b1 Add charset to UTF-8 for content type headers 8 years ago
Buddy Sandidge 27f0424765 DRY some code, add helper function handleHTTPAs 8 years ago
Buddy Sandidge b0b44a992f Allow multiple formats for response, add html and json response
• If a request comes in to the root path, look at accept header and
   parse it. Check for hmtl, json, and text. If no known accept header
   comes in, return text/plain
 • Add route for /json that always returns json response
 • Add route for /text that always returns text response
 • Add route for /html that always returns html response
8 years ago
Buddy Sandidge ba99b61aa0 Use headers to check ip addresses for use behind proxy
• Break file up to multiple files
 • Can pass in headers through command line arguments, defaults for
   checking X-Real-IP and X-Forwarded-For
 • Add logging for requests with timing
 • Add 404 support for missing URLs
8 years ago