[SOLVED] Getting error 500 with CORS middleware while using OPTIONS method

I was able to solve the problem by changing the CORS middleware order as it was suggested by @tboerger in CORS headers are broken for me since 2.0.6