1. 18 Apr, 2017 1 commit
    • Matthew Holt's avatar
      httpserver: max_certs now forces On-Demand TLS even if name is known · 4462e397
      Matthew Holt authored
      Original feature request in forum:
      https://forum.caddyserver.com/t/caddy-with-specific-hosts-but-on-demand-tls/1704?u=matt
      
      Before, Caddy obtained certificates for every name it could at startup.
      And it would only obtain certificates during the handshake for sites
      defined with a hostname that didn't qualify at startup (like
      "*.example.com" or ":443"). This made sense for most situations, and
      helped ensure that certificates were obtained as early and reliably as
      possible.
      
      With this change, Caddy will NOT obtain certificates for hostnames it
      knows at startup (even if they qualify) if OnDemand is enabled.
      
      But I think this change generalizes well, because a user who specifies
      max_certs is deliberately turning on On-Demand TLS, fully aware of
      the consequences. It seems dubious to ignore that config when the user
      deliberately put it there. We'll see how this goes.
      4462e397
  2. 17 Apr, 2017 4 commits
  3. 16 Apr, 2017 2 commits
  4. 15 Apr, 2017 2 commits
  5. 14 Apr, 2017 2 commits
  6. 08 Apr, 2017 2 commits
  7. 03 Apr, 2017 1 commit
  8. 02 Apr, 2017 2 commits
    • Angel Santiago's avatar
      proxy: Cleanly shutdown health checks on restart (#1524) · 59bf71c2
      Angel Santiago authored
      * Add a shutdown function and context to staticUpstream so that running goroutines can be cancelled. Add a GetShutdownFunc to Upstream interface to expose the shutdown function to the caddy Controller for performing it on restarts.
      
      * Make fakeUpstream implement new Upstream methods.
      
      Implement new Upstream method for fakeWSUpstream as well.
      
      * Rename GetShutdownFunc to Stop(). Add a waitgroup to the staticUpstream for controlling individual object's goroutines. Add the Stop function to OnRestart and OnShutdown. Add tests for checking to see if healthchecks continue hitting a backend server after stop has been called.
      
      * Go back to using a stop channel since the context adds no additional benefit.
      Only register stop function for onShutdown since it's called as part of restart.
      
      * Remove assignment to atomic value
      
      * Incrementing WaitGroup outside of goroutine to avoid race condition. Loading atomic values in test.
      
      * Linting: change counter to just use the default zero value instead of setting it
      
      * Clarify Stop method comments, add comments to stop channel and waitgroup and remove out of date comment about handling stopping the proxy. Stop the ticker when the stop signal is sent
      59bf71c2
    • Toby Allen's avatar
      Add new browse sort - namedirfirst (#1551) · 464ade1d
      Toby Allen authored
      * Revert "browse: sort listing by dir first (#1527)"
      
       commit 4e1229e7.
      
      * Add new browse sort order  namedirfirst. Make namedirfirst default sort
      464ade1d
  9. 01 Apr, 2017 1 commit
  10. 31 Mar, 2017 1 commit
  11. 29 Mar, 2017 1 commit
    • W-Mark Kubacki's avatar
      browse: when sorting by size, sort directory section by name · 398d9a6b
      W-Mark Kubacki authored
      Previously directories have been merely pulled to the front, and then
      sorted arbitrarily. That is, their order among themselves depended on
      the filesystem implementations. Something opaque to the visitor.
      
      This fixes said inconsistency, and implements the by-size-then-by-name
      order I initially intended for this.
      398d9a6b
  12. 28 Mar, 2017 3 commits
  13. 25 Mar, 2017 1 commit
  14. 23 Mar, 2017 1 commit
  15. 21 Mar, 2017 1 commit
  16. 15 Mar, 2017 1 commit
    • ericdreeves's avatar
      browse: Use helper functions in staticfiles to redirect (#1497) · 36d20274
      ericdreeves authored
      * Use helper functions in staticfiles to redirect.
      
      Previously the browse package invoked staticfiles.Redirect when
      redirecting clients who requested a directory but with a Request-URI
      that did not contain a trailing '/'. staticfiles.Redirect only used a
      relative URI. This change defers the decision of how to format the
      Location header value to the helper methods in the staticfiles package.
      
      * Update const URLPathCtxKey in browse package.
      36d20274
  17. 14 Mar, 2017 1 commit
    • Peer Beckmann's avatar
      proxy: Add the first policy (#1513) · a148b923
      Peer Beckmann authored
      * Add the first policy which sends the request to the first available host
      
      * Make the error message clear. As we expect the second not first upstream
      host.
      a148b923
  18. 13 Mar, 2017 3 commits
  19. 12 Mar, 2017 3 commits
  20. 11 Mar, 2017 1 commit
    • Toby Allen's avatar
      Fix issue #1346 {path} logging {uri} and add {rewrite_uri} placeholder (#1481) · cfe52084
      Toby Allen authored
      * Fixed issue with {path} actually {uri}
      
      * Test added for path rewrite
      
      * add in uri_escaped
      
      * added rewrite_uri and test
      
      * fix broken test.  Just checks for existance of rewrite header
      
      * gitignore
      
      * Use context to store uri value
      
      * ignore .vscode
      
      * tidy up, removal of comments and invalidated tests
      
      * Remove commented out code.
      
      * added comment as requested by lint
      
      * fixed spelling mistake
      
      * clarified code with variable name
      
      * added context for uri and test
      
      * added TODO comment to move consts
      cfe52084
  21. 10 Mar, 2017 6 commits