10 Commits (27f04247659af414b473236b0187430cdfcb8e12)
 

Author SHA1 Message Date
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
Buddy Sandidge 77fe2532d5 Add web framework dependencies for pat and negroni 8 years ago
Buddy Sandidge b68d88fda9 Add errors library 8 years ago
Buddy Sandidge 35474b635a Have service listen and server over TLS
Pass in command line arguments to the path of the certificate and key
files.
8 years ago
Buddy Sandidge d1b889eac2 Use CLI package to make address an argument 8 years ago
Buddy Sandidge e33df20ee1 Add cli library as dependency 8 years ago
Buddy Sandidge c3a54a1b85 Add proof of concept WebApp with basic functionality
TODO:
 • Add arguments to app for port and address
 • Add x-forwarded-for header support for use behind proxies
 • Be able to give response in text, json or html
8 years ago
Buddy Sandidge d199e866c8 Initial commit 8 years ago