问题探索
问题引入
目前在 Vite+Vue3 的项目中使用 fetch API 调用 siyuan 的 API 时候,如果加上 API 鉴权,就会返回 CORS 错误,如下:

根据 https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request 这篇文章的理解
...大约 2 分钟
目前在 Vite+Vue3 的项目中使用 fetch API 调用 siyuan 的 API 时候,如果加上 API 鉴权,就会返回 CORS 错误,如下:

根据 https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request 这篇文章的理解
修改suduousers,
sudo su
visudo -f /etc/sudoers