Score:0

OPTIONS method gets 200 status instead of 301 in IIS10 logs

us flag

I'm trying to learn why OPTIONS method requests (presumably CORS preflight requests) are logged as 200 status while all GET method requests are logged as the expected 301 (moved permanently). The only thing being returned at that address is a Response.RedirectPermanent with the new address.

For context, the 301 has been in place for a few weeks, and in many cases the Referer URL has been gone a lot longer, so my first thought is that this is a scripted call. Except for these OPTIONS request, everything else hitting the specific URL I'm looking at have telltale signs of automation like coming from long-gone Referers. With these OPTIONS requests, frequently a given address in the log will only make that one call to the server and then nothing ever again. So the pattern suggests its a proxy for some form of automation. Again, this paragraph is just for context, it's not the question itself. I'm not worried about potential automation.

Getting back to the question - why do these OPTIONS requests show up as 200 in this circumstance? Ultimately the reason I'm trying to find out why is because I want to know if I need to do anything to accommodate these requests properly or if this is just expected behavior for this type of request to a permanent redirect.

Lex Li avatar
vn flag
Instead of asking whoever has no access to your machine, you can help yourself understand the processing better by enabling FRT, https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/iis/health-diagnostic-performance/troubleshoot-php-with-failed-request-tracing
Merennulli avatar
us flag
@LexLi Thank you. While FRT was not itself helpful, searching for CORS requests in relation to FRT keywords did finally give me an answer I wasn't able to find the past few weeks.
Score:0
us flag

The answer turns out to be - Yes, it is expected behavior. Redirect is not allowed for CORS requests across subdomains, so it is returning a 200 status instead.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.