You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Almost every request to thingboard is accompanied by a preflight OPTIONS request. This is slow and taxes the server. To lower the amount of preflight requests, set the following headers in the preflight response:
Access-Control-Max-Age: 86400
This allow caching of preflight requests for up to 1 day (chrome will cap this to 10 minutes)
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, OPTIONS
This allow caching of preflight requests for different HTTP methods. If a non-standard HTTP method is in Access-Control-Request-Method, add it to the list. Ideally, this header would have a wildcard (*) value, but some slightly outdated browsers don't support the wildcard.
Almost every request to thingboard is accompanied by a preflight OPTIONS request. This is slow and taxes the server. To lower the amount of preflight requests, set the following headers in the preflight response:
Access-Control-Max-Age: 86400
This allow caching of preflight requests for up to 1 day (chrome will cap this to 10 minutes)
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, OPTIONS
This allow caching of preflight requests for different HTTP methods. If a non-standard HTTP method is in
Access-Control-Request-Method
, add it to the list. Ideally, this header would have a wildcard (*
) value, but some slightly outdated browsers don't support the wildcard.Reference:
Preflight request
Access-Control-Max-Age
Access-Control-Allow-Methods
Access-Control-Request-Method
The text was updated successfully, but these errors were encountered: