1. 11 Jun, 2019 1 commit
    • Jared Ririe's avatar
      caddytls: Fix goroutine leak when restarting Caddy (#2644) · d11b6481
      Jared Ririe authored
      Each time the Caddyfile reloads and Caddy is restarted,
      caddytls.NewConfig starts a goroutine for cleaning the
      certificate storage. This goroutine ranges over a time.Ticker
      channel; although Stop is called on this ticker, Stop does
      not close the underlying channel so the goroutine never exits.
      
      This change adds an additional channel that is listened to
      in the certificate cleaning goroutine so it can exit
      on restarts.
      d11b6481
  2. 27 May, 2019 2 commits
  3. 24 May, 2019 2 commits
    • AndreKR's avatar
      Simple rewrite regex captures (#2592) · 4bad5c79
      AndreKR authored
      * More informative rewrite test output
      
      When running rewrite tests, the output in case of a test failure now
      includes not only the rewritten URLs but also the from URL.
      
      * Move re-escaping to regexpMatches
      
      This commit moves the code to post-process the match replacements from
      ComplexRule to regexpMatches, so it can later be re-used for SimpleRule.
      
      Also changes the comment in an attempt to better explain the reasoning
      behind that code.
      
      The required strings.Replacer is now built only once.
      
      * Support regex captures in simple rewrite rules
      
      Closes #2586
      4bad5c79
    • Łukasz Nowak's avatar
      81430e4a
  4. 14 May, 2019 1 commit
  5. 26 Apr, 2019 1 commit
  6. 24 Apr, 2019 1 commit
  7. 22 Apr, 2019 1 commit
    • Taufiq Rahman's avatar
      fix lint warnings (issue 2541) (#2551) · c32a0f5f
      Taufiq Rahman authored
      * Lint: fix some errcheck #2541
      
      * Lint: fix passing structcheck #2541
      
      * Lint: update fix structcheck #2541
      
      * Lint: fix errcheck for basicauth, browse, fastcgi_test #2541
      
      * Lint: fix errcheck for browse, fastcgi_test, fcgiclient, fcgiclient_test #2541
      
      * Lint: fix errcheck for responsefilter_test, fcgilient_test #2541
      
      * Lint: fix errcheck for header_test #2541
      
      * Lint: update errcheck for fcgiclient_test #2541
      
      * Lint: fix errcheck for server, header_test, fastcgi_test, https_test, recorder_test #2541
      
      * Lint: fix errcheck for tplcontext, vhosttrie_test, internal_test, handler_test #2541
      
      * Lint: fix errcheck for log_test, markdown mholt#2541
      
      * Lint: fix errcheck for policy, body_test, proxy_test #2541
      
      * Lint: fix errcheck for on multiple packages #2541
      
      - reverseproxy
      - reverseproxy_test
      - upstream
      - upstream_test
      - body_test
      
      * Lint: fix errcheck in multiple packages mholt#2541
      - handler_test
      - redirect_test
      - requestid_test
      - rewrite_test
      - fileserver_test
      
      * Lint: fix errcheck in multiple packages mholt#2541
      
      - websocket
      - setup
      - collection
      - redirect_test
      - templates_test
      
      * Lint: fix errcheck in logger test #2541
      
      run goimports against #2551
      - lexer_test
      - log_test
      - markdown
      
      * Update caddyhttp/httpserver/logger_test.go
      Co-Authored-By: default avatarInconnu08 <taufiqrx8@gmail.com>
      
      * Update log_test.go
      
      * Lint: fix scope in logger_test #2541
      
      * remove redundant err check in logger_test #2541
      
      * fix alias in logger_test #2541
      
      * fix import for format #2541
      
      * refactor variable names and error check #2541
      c32a0f5f
  8. 20 Apr, 2019 9 commits
  9. 17 Apr, 2019 1 commit
  10. 12 Apr, 2019 1 commit
  11. 09 Apr, 2019 2 commits
  12. 07 Apr, 2019 1 commit
  13. 06 Apr, 2019 1 commit
  14. 30 Mar, 2019 5 commits
  15. 17 Mar, 2019 1 commit
  16. 16 Mar, 2019 1 commit
  17. 15 Mar, 2019 1 commit
  18. 11 Mar, 2019 2 commits
  19. 06 Mar, 2019 1 commit
    • comp500's avatar
      proxy: Change headers using regex (#2144) · 47b78714
      comp500 authored
      * Add upstream header replacements (TODO: tests, docs)
      
      * Add tests, fix a few bugs
      
      * Add more tests and comments
      
      * Refactor header_upstream to use a fallthrough; return regex errors
      47b78714
  20. 05 Mar, 2019 1 commit
  21. 04 Mar, 2019 4 commits
    • Matthew Holt's avatar
      vendor: Update lego; notes for v0.11.5 · 80dfb8b2
      Matthew Holt authored
      80dfb8b2
    • Toby Allen's avatar
      httpserver: More organized startup output (#2497) · 98f160e3
      Toby Allen authored
      * Move SiteOutput to a seperate function sorted by port.
      
      * Rename vars and tidy up
      
      * Move loopback note to output loop
      
      * Fix Typo
      
      * Remove unneeded var
      
      * Readability Change
      
      * Change to other port string.
      
      * Simplify as all sites in Server use the same port
      
      * Ensure -quiet supresses fmt.Println calls
      
      * Prevent double output of siteinfo to log - improve log message
      
      * change name of log in comment
      
      * Remove spaces
      
      * Remove extra line output
      
      * final tidy!
      
      * Use caddy.LogDestination to setup log
      
      * Ensure Log is still output if quiet.
      
      * Correct case of functions and make function param bool
      
      * Remove conditional check for LogDestination
      
      * Revert output to simple blocks
      
      * comment update
      98f160e3
    • Toby Allen's avatar
      basicauth: Simplify user replacement on auth failure (#2470) · 4f8020a9
      Toby Allen authored
      * Can simply add user to replacer before Replace call.  user is then also added to logs
      
      * use fmt.Errorf
      
      * fix how fmt.Errorf is called.
      4f8020a9
    • Toby Allen's avatar
      errors: Return parse error if more than one argument (#2472) · b295aab2
      Toby Allen authored
      * Check errors directive only has 1 argument
      
      * Added Tests
      b295aab2