Skip to content
This repository was archived by the owner on Nov 19, 2019. It is now read-only.
This repository was archived by the owner on Nov 19, 2019. It is now read-only.

Setting Cookies causes bad request #145

@KyleMit

Description

@KyleMit

Maybe this is a security concern so it might not be in the realm of possibilities, but I'm trying to emulate the client side portion of cookies in a plunk (for client only, you can just use localStorage, but I'll plumb up the cookie sending/receiving bits on my own server)

cookie

The problem is, setting a cookie seems to invalidate any subsequent requests (which will also send that cookie to the server). I'm guessing the server doesn't like receiving cookies it doesn't have any knowledge of, but it's probably welcome to not read those anyway. In either case, after the initial load, all subsequent requests will return:

Oh dear, something didn't go quite right
Bad Request

Here's a trivial plunk that displays this issue:

https://plnkr.co/edit/8mKpTFl3u8R63fGF8yaj

It'll work the first time before the cookie has been set (testable in incognito window), but all subsequent requests will cause issues when the cookie is sent to the server

error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions