The htmx.config.mode option sets the mode option for fetch requests.
Default: "same-origin"
Valid Values
"same-origin"- Only allow same-origin requests"cors"- Allow cross-origin requests"no-cors"- Limited cross-origin requests"navigate"- Navigation mode
Example
htmx.config.mode = "cors";
<meta name="htmx-config" content='{"mode":"cors"}'>