If I want to use rewrites for some endpoints, do I need to configure rewrite rule also for OPTIONS method for CORS to be managed by Tyk?
Without explicit rewrite rule for OPTIONS, I get 404 not found responses for preflight requests. Am I missing something?
{
"path": "{apikey}/intake/v2/rum/events",
"method": "POST",
"match_pattern": "(.*)",
"rewrite_to": "/intake/v2/rum/events"
},
CORS config part:
"CORS": {
"enable": true,
"allowed_origins": [
"https://*.mydomain.com",
"http://*.mydomain.com"
],
"allowed_methods": [
"GET",
"POST",
"HEAD"
],
"allow_credentials": true,
"max_age": 24,
"options_passthrough": false
},