muxinc / upchunk

Uploads Chunks! Takes big files, splits them up, then uploads each one with care (and PUT requests).
MIT License
336 stars 46 forks source link

How to set withCredentials = true options. #80

Open tom-turner opened 2 years ago

tom-turner commented 2 years ago

Hey!

I could not figure out how to set headers to include credentials on the request. How is this done?

Thanks, Tom.

davekiss commented 2 years ago

@tom-turner we don't currently have a way to set withCredentials in this library. Note that this is different from setting the headers, which this library does support.

Can you tell me a bit more about your use case? If it's an obvious missing feature, I could probably whip up a PR to implement this functionality pretty quickly.

tom-turner commented 2 years ago

Hey! sorry for my late reply.

I'm was hoping to use httpOnly cookies for user auth and i would like these to be included in the request to the server. I don't think setting my own headers is an option as i cant access the cookie from the client side. Would be amazing if there was a way to include credentials on the request.

Many thanks! Tom.

wyxos commented 2 years ago

@tom-turner Is your use case an attempt to link a frontend UI to Laravel back-end? I was wondering if it had anything to do with this too as the request performed by the plugin keeps giving me 419 which I suspect is relative to the above missing configuration.