caddy icon indicating copy to clipboard operation
caddy copied to clipboard

Add the uniqueness judgment of id

Open Chise1 opened this issue 7 months ago • 4 comments

Perform a uniqueness check on the passed id parameter. If it exists, an error will be reported.

Chise1 avatar Apr 30 '25 02:04 Chise1

?????

francislavoie avatar Apr 30 '25 03:04 francislavoie

@francislavoie like this:

`

{ "@id": "route4", "match": [{"path_regexp": {"name": "path5","pattern": "path5"}}], "handle": [ { "@id": "xx", ... }, { "@id": "xx", ... } ] }

` I think it is a bad configuration.However, caddy did not check whether @id was unique.

Chise1 avatar May 07 '25 06:05 Chise1

I see. Yes, that's a valid complaint.

Please use code formatting with triple backticks ``` or click the <> button to insert a code block.

francislavoie avatar May 07 '25 06:05 francislavoie

I submitted a pr. This is my first time submitting a pr. If there is anything that needs to be modified, please let me know. If you think my code is not good, stop it directly.

Chise1 avatar May 07 '25 07:05 Chise1