Commit Graph

15 Commits

Author SHA1 Message Date
a76d005a94 Use maps.Copy for simpler map handling (#7009)
Some checks failed
Lint / lint (macos-14, mac) (push) Has been cancelled
Lint / lint (ubuntu-latest, linux) (push) Has been cancelled
Lint / lint (windows-latest, windows) (push) Has been cancelled
Lint / govulncheck (push) Has been cancelled
Tests / test (./cmd/caddy/caddy, ~1.24.1, macos-14, 0, 1.24, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy, ~1.24.1, ubuntu-latest, 0, 1.24, linux) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.24.1, windows-latest, True, 1.24, windows) (push) Has been cancelled
Tests / test (s390x on IBM Z) (push) Has been cancelled
Tests / goreleaser-check (push) Has been cancelled
Cross-Build / build (~1.24.1, 1.24, aix) (push) Has been cancelled
Cross-Build / build (~1.24.1, 1.24, darwin) (push) Has been cancelled
Cross-Build / build (~1.24.1, 1.24, dragonfly) (push) Has been cancelled
Cross-Build / build (~1.24.1, 1.24, freebsd) (push) Has been cancelled
Cross-Build / build (~1.24.1, 1.24, illumos) (push) Has been cancelled
Cross-Build / build (~1.24.1, 1.24, linux) (push) Has been cancelled
Cross-Build / build (~1.24.1, 1.24, netbsd) (push) Has been cancelled
Cross-Build / build (~1.24.1, 1.24, openbsd) (push) Has been cancelled
Cross-Build / build (~1.24.1, 1.24, solaris) (push) Has been cancelled
Cross-Build / build (~1.24.1, 1.24, windows) (push) Has been cancelled
Signed-off-by: eveneast <qcqs@foxmail.com>
2025-05-13 15:16:47 -06:00
f297bc0a04 admin: Remove host checking for UDS (close #6832)
The consensus is that host enforcement on unix sockets is ineffective, frustrating, and confusing. (Unix sockets have their own OS-level permissions system.)
2025-04-15 14:20:22 -06:00
d7621fdbe6 tests: tests for error handling & metrics in admin endpoints (#6805)
* feat/tests: tests for error handling & metrics in admin endpoints

- TestAdminHandlerErrorHandling - Tests the handler.handleError()
   functionality by directly verifying error response formatting
- TestAdminHandlerBuiltinRouteErrors - Tests the error
   handling pathway by using real admin server routes and verifying
   both error responses and prometheus metrics increments
- provisionAdminRouters: add unit tests for admin handler registration and routing for admin.api
- TestAllowedOriginsUnixSocket: checks unix socket with default origins are added
- TestReplaceRemoteAdminServer: test for replaceRemoteAdminServer with certificate validation, custom origins and cleanup

* test: added test for manage manageIdentity

---------

Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
2025-02-12 11:39:47 +00:00
0e204b730a admin: Respond with 4xx on non-existing config path (#5870)
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2023-10-11 20:24:29 +00:00
821a08a6e3 httpcaddyfile: Fix protocols global option parsing (#5054)
* httpcaddyfile: Fix `protocols` global option parsing

When checking for a block, the current nesting must be used, otherwise it returns the wrong thing.

* Adjust adapt test to cover the broken behaviour that is now fixed

* Fix some admin tests which suddenly run even with -short
2022-09-20 08:09:04 -06:00
141872ed80 chore: Bump up to Go 1.19, minimum 1.18 (#4925) 2022-08-02 16:39:09 -04:00
ad3a83fb91 admin: expect quoted ETags (#4879)
* expect quoted etags

* admin: Minor refactor of etag facilities

Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2022-07-12 12:23:55 -06:00
f259ed52bb admin: support ETag on config endpoints (#4579)
* admin: support ETags

* support etags

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2022-07-06 13:50:07 -06:00
a10910f398 admin: Sync server variables (fix #4260) (#4274)
* Synchronize server assignment/references to avoid data race

* only hold lock during var reassignment
2021-08-16 15:04:47 -06:00
6455efa5d3 admin: POST /... expands and appends all array elements
Makes it easy to append many items to an array in one command
2019-12-17 10:11:45 -07:00
35f70c98fa core: Major refactor of admin endpoint and config handling
Fixed several bugs and made other improvements. All config changes are
now mediated by the global config state manager. It used to be that
initial configs given at startup weren't tracked, so you could start
caddy with --config caddy.json and then do a GET /config/ and it would
return null. That is fixed, along with several other general flow/API
enhancements, with more to come.
2019-11-04 12:05:20 -07:00
3177ee8010 Add license 2019-06-30 16:07:58 -06:00
5137859e47 Rename caddy2 -> caddy
Removes the version from the package name
2019-06-14 11:58:28 -06:00
2eb3593327 Begin implementing HTTP replacer and static responder 2019-05-04 13:21:20 -06:00
a8dc73b4d9 Performance testing Load function 2019-03-26 19:42:52 -06:00