<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shiba-yan</author_name>
  <author_url>https://blog.hatena.ne.jp/shiba-yan/</author_url>
  <blog_title>しばやん雑記</blog_title>
  <blog_url>https://blog.shibayan.jp/</blog_url>
  <categories>
    <anon>ASP.NET Core</anon>
  </categories>
  <description>ASP.NET Web API が追加されたときに問題になった、HTTP 401 を返すとリダイレクトに変換される挙動ですが、ASP.NET Core 2.1 でも近い挙動になるようにデフォルトで設定されています。当時は謎のキーを追加しましたが、結局 ASP.NET 自体にフラグが追加されて対応されました。ASP.NET Core MVC では以前のように酷い挙動ではないですし、普通に使っていると問題のない挙動になっていますが、それでも特定のケースでは 401 ではなくリダイレクトに変換されます。少し迷ったので、挙動を調べた結果をメモとして残しておきます。 リダイレクトされるのは Cookie…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.shibayan.jp%2Fentry%2F2018%2F09%2F18%2F233144&quot; title=&quot;ASP.NET Core 2.1 で未ログイン時にリダイレクトされる条件を調べた - しばやん雑記&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>https://cdn-ak.f.st-hatena.com/images/fotolife/s/shiba-yan/20180918/20180918224115.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-09-18 23:31:44</published>
  <title>ASP.NET Core 2.1 で未ログイン時にリダイレクトされる条件を調べた</title>
  <type>rich</type>
  <url>https://blog.shibayan.jp/entry/2018/09/18/233144</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
