Sync gateway cookie access

You can write a small service that handles the authentication on the admin port and returns the session id, then generate the cookie from your client. Although, cookies are not isolated by port, so there’s probably something else wrong

For historical reasons, cookies contain a number of security and
privacy infelicities. For example, a server can indicate that a
given cookie is intended for “secure” connections, but the Secure
attribute does not provide integrity in the presence of an active
network attacker. Similarly, cookies for a given host are shared
across all the ports on that host, even though the usual "same-origin
policy" used by web browsers isolates content retrieved via different
ports.

Regards,
Vladimir