imagekit-react
imagekit-react copied to clipboard
IKUpload: How to modify the GET request's header?
From uploading-files-in-react docs
- I've created the auth endpoint (express-js)
- I've specificed the auth endpoint for
authenticationEndpoint - Image upload is working as expected
However, I have a concern that this is not considered secure as anyone could call the auth endpoint and get a token.
Then, I saw the reply here
The endpoint is supposed to host on your backend. You can make it secure in a way that no unauthorised user can get token. Similar to how you might be protecting other resources on your application.
Originally posted by @imagekitio in https://github.com/imagekit-developer/imagekit-react/issues/50#issuecomment-945863423
So, I protected the auth endpoint, but I could not find a way to modify the authenticationEndpoint GET request's header to pass users Bearer Token along from the client-side.
Any advice, please?