# Companion to pass (session) cookie

**URL:** <https://community.transloadit.com/t/companion-to-pass-session-cookie/15161>\
**Category:** Uppy\
**Created:** [December 11, 2019, 4:52pm UTC](https://community.transloadit.com/t/companion-to-pass-session-cookie/15161 "2019-12-11T16:52:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alan](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/alan/32/199_2.png) [@Alan](https://community.transloadit.com/u/Alan)\
**Post date:** [December 11, 2019, 4:52pm UTC](https://community.transloadit.com/t/companion-to-pass-session-cookie/15161/1 "2019-12-11T16:52:38Z")

</div>

Is there an option for Companion to pass session cookies to the server?

Looking at the code it seems Companions removes “cookie” header (among other headers) before posting to the server - is there a reason for that?

If I remove this restriction, will `companionHeaders` work to pass a cookie to the server?

Thanks!

---

<div class="post-metadata">

**Author:** ![Alan](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/alan/32/199_2.png) [@Alan](https://community.transloadit.com/u/Alan)\
**Post date:** [December 16, 2019, 1:52pm UTC](https://community.transloadit.com/t/companion-to-pass-session-cookie/15161/2 "2019-12-16T13:52:17Z")

</div>

I think my question was not clear enough, I’ll describe a bit more:

We’re using Companion as a standalone server, behind Apache as reverse proxy to support https on a subdomain.

As the last step, Companion calls the endpoint with the uploaded file - is it possible to pass the session cookie from the reverse proxy to Companion and from Companion to our server so it’ll look like the call was originated from the user?

Why? to be able to authenticate and validate the upload request.

Hope this is more clear - thanks for the help 🙂

---

<div class="post-metadata">

**Author:** ![ifedapoolarewaju](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/ifedapoolarewaju/32/36_2.png) [@ifedapoolarewaju](https://community.transloadit.com/u/ifedapoolarewaju)\
**Post date:** [December 18, 2019, 9:00am UTC](https://community.transloadit.com/t/companion-to-pass-session-cookie/15161/3 "2019-12-18T09:00:52Z")

</div>

Hi @Alan, I think I’m a bit confused by the question because I can’t distinguish when you are referring to Companion-client, and when you are referring to Companion (the standalone server). Could you please elaborate on this?

---

<div class="post-metadata">

**Author:** ![Alan](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/alan/32/199_2.png) [@Alan](https://community.transloadit.com/u/Alan)\
**Post date:** [December 18, 2019, 1:06pm UTC](https://community.transloadit.com/t/companion-to-pass-session-cookie/15161/4 "2019-12-18T13:06:50Z")

</div>

Sure @ifedapoolarewaju, I would like to pass the user’s session cookie all the way from Uppy/Companion client -\> Apache Reverse Proxy -\> Companion Server -\> App Server

Is Companion Server able to pass cookies to my App Server?
