Add HTML comment and catch-all to responseHandling config via <meta> tag (#2793)

* Add HTML comment that was removed

* Add catch-all

---------

Co-authored-by: ekzyis <ekzyis@ekzy.is>
This commit is contained in:
ekzyis 2024-08-09 10:49:24 -05:00 committed by GitHub
parent bb733a88f1
commit f925e83b95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -973,6 +973,12 @@ Using the [meta config](#configuration-options) mechanism for configuring respon
config:
```html
<!--
* 204 No Content by default does nothing, but is not an error
* 2xx, 3xx and 422 responses are non-errors and are swapped
* 4xx & 5xx responses are not swapped and are errors
* all other responses are swapped using "..." as a catch-all
-->
<meta
name="htmx-config"
content='{
@ -980,7 +986,8 @@ config:
{"code":"204", "swap": false},
{"code":"[23]..", "swap": true},
{"code":"422", "swap": true},
{"code":"[45]..", "swap": false, "error":true}
{"code":"[45]..", "swap": false, "error":true},
{"code":"...", "swap": true}
]
}'
/>