caddy
caddy copied to clipboard
caddy.go: Check whether @id is unique
Fixes: https://github.com/caddyserver/caddy/issues/6991
Check whether @id is unique.If it is not unique,rollback caddy config json. I'm not sure if it can work properly under caddyfile.
I added length detection and fixed a stupid problem. From the perspective of code analysis, "err" will not be repeated.
Changes of rewrite, involves nginx-adapter-case
Changes of rewrite, involves nginx-adapter-case
Please keep the PR topical and focused. Split these changes into a separate PR.
I have deleted the irrelevant pr
I feel like a better approach would be to check the ID as it's being read in and we're creating the mapping of IDs to their full config paths. If we return an error the rest should be handled automatically (no need to roll back, etc)
I feel like a better approach would be to check the ID as it's being read in and we're creating the mapping of IDs to their full config paths. If we return an error the rest should be handled automatically (no need to roll back, etc)
If we do as you said, the content that needs to be modified is rather complicated. This is beyond my ability. I'm worried that the modification will introduce bugs.
add one test.