Hi,
I'm trying to execute a Cloud Script to reset the user's password via this REST API request. I am not using PlayFab's JavaScript SDK here as this is just a static website where the user can input a new password.
Whenever I make the ajax request below I get the error "Access to XMLHttpRequest at 'https://e206c.playfabapi.com/Client/ExecuteCloudScript' from origin 'null' has been blocked by CORS policy: Request header field sessionticket is not allowed by Access-Control-Allow-Headers in preflight response."
This is the request I send:
$.ajax({ beforeSend: (jqXHR, settings) => { jqXHR.setRequestHeader("SessionTicket", data.data.SessionTicket); }, type: "POST", url: "https://E206C.playfabapi.com/Client/ExecuteCloudScript", data: JSON.stringify({ FunctionName: "resetPassword", FunctionParameter: { password: $("#password").val(), token: urlParams.get("token") } }), success: handleSuccess, error: handleError, contentType: "application/json" })