I have an issue where the CORS preflight (OPTIONS) request for an intermittently-used Firebase function takes some 8 seconds when the function hasn't been used recently. I'm using Firebase's App Check, so I don't have direct control over CORS config. The actual function execution time is normal, and subsequent preflight requests are processed quickly until the function becomes inactive again.
From a HAR file:
Request method: OPTIONS
Wait time: 7299 ms
I wouldn't expect the infrastructure handling CORS preflight requests to be subject to cold starts in the same way as my actual function execution. Is an 8-second delay for a preflight request a normal occurrence due to cold starts, or could there be another issue? Thanks for any thoughts!