SpineEventEngine / web

Spine web server and JS client library.
https://spine.io
Apache License 2.0
1 stars 3 forks source link

[1.x] Allow customization of HTTP requests sent by the JavaScript client. #189

Open YegorUdovchenko opened 2 years ago

YegorUdovchenko commented 2 years ago

Currently, there's no way to modify requests sent by the Spine Web client for JavaScript to the backend. The common use case is the necessity to attach security headers to all HTTP requests to the backend. To do so in Pure Photos, we initialize the client instance and then replace its internal HttpClient with our custom client that does the same things, but attaches some headers to the requests.

Another thing that is currently not configurable is that the standard HttpClient sends requests in the CORS mode. It may be OK for the most applications but should not be mandatory. Some applications may have the same origin for their frontend/backend and use regular requests in non-CORS mode.

armiol commented 1 year ago

Addressed via #194.