I created a function app using the Azure portal. I checked POST and OPTIONS as allowed methods. I deleted the default CORS settings and allowed *. Now, when I issue an OPTIONS request using a REST client, I get an error returned. I checked the logs and found the following. My question: it sounds like maybe my function is being executed and when no Authorization header and/or no payload is found it throws an error. Maybe I don't understand the OPTIONS request. What are my options for preventing this from happening in the Azure portal function app?
TIA for any help.
2019-05-17T09:16:26.479 [Info] Executing HTTP request: {
"requestId": "38609669-59f4-4ded-9685-ef67af3c2909",
"method": "OPTIONS",
"uri": "/api/ProcessEntries"
}
2019-05-17T09:16:26.479 [Info,ProcessEntries] Function started (Id=41b4691d-98ec-432f-8e6e-de1e1dcd13b6)
2019-05-17T09:16:26.479 [Info,ProcessEntries] Executing 'Functions.ProcessEntries' (Reason='This function was programmatically called via the host APIs.', Id=41b4691d-98ec-432f-8e6e-de1e1dcd13b6)
2019-05-17T09:16:26.495 [Error] A ScriptHost error has occurred
2019-05-17T09:16:26.495 [Error] Cannot perform runtime binding on a null reference
2019-05-17T09:16:26.526 [Error,ProcessEntries] Exception while executing function: Functions.ProcessEntries. Microsoft.Azure.WebJobs.Script: One or more errors occurred. Anonymously Hosted DynamicMethods Assembly: Cannot perform runtime binding on a null reference.
2019-05-17T09:16:26.573 [Error,ProcessEntries] Exception while executing function: Functions.ProcessEntries
2019-05-17T09:16:26.573 [Error,ProcessEntries] Cannot perform runtime binding on a null reference
2019-05-17T09:16:26.573 [Error,ProcessEntries] Function completed (Failure, Id=41b4691d-98ec-432f-8e6e-de1e1dcd13b6, Duration=87ms)
2019-05-17T09:16:26.573 [Error,ProcessEntries] Executed 'Functions.ProcessEntries' (Failed, Id=41b4691d-98ec-432f-8e6e-de1e1dcd13b6)
2019-05-17T09:16:26.573 [Error,ProcessEntries] Cannot perform runtime binding on a null reference
2019-05-17T09:16:26.573 [Error,ProcessEntries] Function had errors. See Azure WebJobs SDK dashboard for details. Instance ID is '41b4691d-98ec-432f-8e6e-de1e1dcd13b6'
2019-05-17T09:16:26.573 [Error,ProcessEntries] Cannot perform runtime binding on a null reference
2019-05-17T09:16:26.588 [Error] {"id":"eada812b-1530-4d26-85e3-4c6e6e243f01","requestId":"38609669-59f4-4ded-9685-ef67af3c2909","statusCode":500,"errorCode":0,"message":"An error has occurred. For more information, please check the logs for error ID eada812b-1530-4d26-85e3-4c6e6e243f01"}
2019-05-17T09:16:26.588 [Error] Cannot perform runtime binding on a null reference