summaryrefslogtreecommitdiff
path: root/caddyconfig/caddyfile/parse_test.go
AgeCommit message (Collapse)Author
2022-03-23caddyfile: Prevent bad block opening tokens (#4655)Francis Lavoie
* caddyfile: Prevent bad block opening tokens * Clarifying comments
2021-09-29Move from deprecated ioutil to os and io packages (#4364)KallyDev
2021-09-16Make copyright notice more consistentMatthew Holt
Some files had the old copyright or were missing the license comment entirely. Also change Light Code Labs to Dyanim in security contact and releases.
2021-05-12caddyfile: Add parse error on site address with trailing `{` (#4163)Francis Lavoie
* caddyfile: Add parse error on site address in `{` This is an incredibly common mistake made by users, so we should catch it earlier in the parser and give a more friendly message. Often it ends up adapting but with mistakes, or erroring out later due to other site addresses being read as directives. There's not really ever a situation where a lone '{' is valid at the end of a site address (but I suppose there are edgecases where the user wants to use a path matcher where it ends specifically in `{`, but... why?), so this should be fine. * Update caddyconfig/caddyfile/parse.go
2021-04-09caddyfile: reject cyclic imports (#4022)Mohammed Al Sahaf
* caddyfile: reject recursive self-imports * caddyfile: detect and reject cyclic imports of snippets and files * caddyfile: do not be stickler about connected nodes not being connected already * caddyfile: include missing test artifacts of cyclic imports * address review comments
2020-11-23caddyfile: Add support for env var defaults; add tests (#3682)Francis Lavoie
* caddyfile: Add support for env var defaults, tests * caddyfile: Use ?? instead, fix redundant cast, remove env chaining * caddyfile: Use : instead
2020-06-01caddyfile: Add args on imports (#3423)Francis Lavoie
* caddyfile: Add support for args on imports * caddyfile: Add more import args tests
2020-04-06tests: Remove noisy logsMatthew Holt
2020-04-01caddyfile: Export NewTestDispenser() (close #2930)Matthew Holt
This allows modules to test their UnmarshalCaddyfile methods.
2020-02-27Fix typos (#3087)Success Go
* Fix typo * Fix typo, thanks for Spell Checker under VS Code
2020-01-09caddyfile: fix replacing variables on imported files (#2970)Mark Sargent
* fix replacing variables on imported files * refactored replaceEnvVars to ensure it is always called * Use byte slices for easier use Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2020-01-09caddyfile: Preprocess env vars in {$THIS} format (#2963)Mark Sargent
* transform a caddyfile with environment variables * support adapt time and runtime variables in the caddyfile * caddyfile: Pre-process environment variables before parsing Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2019-09-16httpcaddyfile: static_response -> respond; minor cleanupsMatthew Holt
2019-08-21Clean up Dispenser and filename handling a bitMatthew Holt
2019-08-21Refactor Caddyfile adapter and module registrationMatthew Holt
Use piles from which to draw config values. Module values can return their name, so now we can do two-way mapping from value to name and name to value; whereas before we could only map name to value. This was problematic with the Caddyfile adapter since it receives values and needs to know the name to put in the config.
2019-08-09Implement config adapters and beginning of Caddyfile adapterMatthew Holt
Along with several other changes, such as renaming caddyhttp.ServerRoute to caddyhttp.Route, exporting some types that were not exported before, and tweaking the caddytls TLS values to be more consistent. Notably, we also now disable automatic cert management for names which already have a cert (manually) loaded into the cache. These names no longer need to be specified in the "skip_certificates" field of the automatic HTTPS config, because they will be skipped automatically.