Cropwise
powered by syngenta

REMOTE SENSING

Creating a Temporary Session

A temporary cropwise session will ensure blazing fast tile rendering on Web Applications.

Why?

By design, the Cropwise Platform APIs will use a Bearer Token through the Authorization header to authenticate requests. This is a standard practice for REST APIs, but it can lead to slower performance when rendering tiles in web applications.

Every time a request containing a Authorization header is made, the browser will first perform a preflight request to check if the server accepts the request, making twice the number of requests.

Solution

To solve this problem, we can create a temporary session that allows us to authenticate requests through query parameters instead of the Authorization header.