1. 22 10月, 2021 1 次提交
  2. 21 10月, 2021 2 次提交
  3. 20 10月, 2021 1 次提交
  4. 19 10月, 2021 2 次提交
  5. 16 10月, 2021 1 次提交
  6. 14 10月, 2021 1 次提交
  7. 12 10月, 2021 2 次提交
  8. 11 10月, 2021 1 次提交
  9. 02 10月, 2021 1 次提交
  10. 30 9月, 2021 1 次提交
  11. 28 9月, 2021 2 次提交
  12. 25 9月, 2021 2 次提交
  13. 21 9月, 2021 1 次提交
    • T
      templates: Add tests for funcInclude and funcImport (#4357) · 16f75212
      Tim Culverhouse 提交于
      * Update tplcontext.go
      
      Add {{ render "/path/to/file.ext" $data }} via funcRender
      
      * Update tplcontext.go
      
      * Refactor funcInclude, add funcImport to enable {{block}} and {{template}}
      
      * Fix funcImport return of nil showing up in html
      
      * Update godocs for  and
      
      * Add tests for funcInclude
      
      * Add tests for funcImport
      
      * os.RemoveAll -> os.Remove for TestFuncInclude and TestFuncImport
      16f75212
  14. 20 9月, 2021 1 次提交
  15. 18 9月, 2021 2 次提交
    • H
      fileserver: Fix displayed file size if it is symlink (#4354) · d3a02599
      HayatoShiba 提交于
      * Fix file size if it is symlink
      
      * change the variable name for readability
      d3a02599
    • T
      templates: Add 'import' action (#4321) · 5fda9610
      Tim Culverhouse 提交于
      Related to (closed) Issue #2094 on template inheritance. This PR adds a new function called "import" which works like "include", except it only takes one argument and passes it to the referenced file to be used as "." in that file.
      
      * Update tplcontext.go
      
      Add {{ render "/path/to/file.ext" $data }} via funcRender
      
      * Update tplcontext.go
      
      * Refactor funcInclude, add funcImport to enable {{block}} and {{template}}
      
      * Fix funcImport return of nil showing up in html
      
      * Update godocs for  and
      5fda9610
  16. 17 9月, 2021 4 次提交
  17. 15 9月, 2021 1 次提交
  18. 14 9月, 2021 1 次提交
  19. 12 9月, 2021 1 次提交
  20. 04 9月, 2021 1 次提交
  21. 03 9月, 2021 1 次提交
  22. 02 9月, 2021 1 次提交
  23. 01 9月, 2021 2 次提交
  24. 31 8月, 2021 1 次提交
  25. 27 8月, 2021 2 次提交
    • M
      go.mod: Upgrade some dependencies · 84b906a2
      Matthew Holt 提交于
      84b906a2
    • F
      httpcaddyfile: Reorder some directives (#4311) · 403732c4
      Francis Lavoie 提交于
      We realized we made some mistakes with the directive ordering, so we're making some minor adjustments.
      
      `abort` and `error` don't really make sense to be after other handler directives, because you would expect to be able to "fail-fast" and throw an error before falling through to some `file_server` or `respond` typically. So we're moving them up to just before `respond`, i.e. before the common handler directives. 
      
      This is also more consistent with our existing examples in the docs, which actually didn't work due to the directive ordering. See https://caddyserver.com/docs/caddyfile/directives/error#examples
      
      Also, `push` doesn't quite make sense to be after `handle`/`route`, since its job is to read from response headers to push additional resources if necessary, and `handle`/`route` may be terminal so push would not be reached if it was declared outside those. And also, it would make sense to be _before_ `templates` because a template _could_ add a `Link` header to the response dynamically.
      403732c4
  26. 26 8月, 2021 3 次提交
  27. 24 8月, 2021 1 次提交
    • F
      reverseproxy: Remove redundant flushing (#4299) · f70a7578
      Francis Lavoie 提交于
      From reading through the code, I think this code path is now obsoleted by the changes made in https://github.com/caddyserver/caddy/pull/4266.
      
      Basically, `h.flushInterval()` will set the flush interval to `-1` if we're in a bi-directional stream, and the recent PR ensured that `h.copyResponse()` properly flushes headers immediately when the flush interval is non-zero. So now there should be no need to call Flush before calling `h.copyResponse()`.
      f70a7578