<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>wannabe-jellyfish</author_name>
  <author_url>https://blog.hatena.ne.jp/wannabe-jellyfish/</author_url>
  <blog_title>くらげになりたい。</blog_title>
  <blog_url>https://memory-lovers.blog/</blog_url>
  <categories>
    <anon>unjs</anon>
    <anon>nitro server</anon>
    <anon>CORS</anon>
  </categories>
  <description>UnJSのNitroでAPIサーバを開発しているときに、 CORSでハマったときにいろいろ調べたときの備忘録(*´ω｀*) preflight requestというのがあり、 OPTIONSmethodでリクエストが飛んでくるが、 GETしか許可していなかったため、うまくいかなかったっぽい Preflight request (プリフライトリクエスト) - MDN Web Docs 用語集: ウェブ関連用語の定義 | MDN nitro.config.tsの設定 nitro.config.tsのrouteRulesで、 全ルートにCORSの設定を追加。 //https://nitro.unjs…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmemory-lovers.blog%2Fentry%2F2024%2F03%2F06%2F130132&quot; title=&quot;UnJS/Nitro ServerでCORSのpreflight requestに対応する - くらげになりたい。&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-03-06 13:01:32</published>
  <title>UnJS/Nitro ServerでCORSのpreflight requestに対応する</title>
  <type>rich</type>
  <url>https://memory-lovers.blog/entry/2024/03/06/130132</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
