Skip to content

A leading dot is added to the domain of the cookies without a subdomain #7901

@ziadloo

Description

@ziadloo

Describe the bug
A leading dot . is added to the beginning of the domain for cookies set without any subdomain.

To Reproduce
Steps to reproduce the behavior:

  1. Send a request (in my case I sent a POST) to a URL that returns Set-Cookie: name=value; path=/; domain=example.com; expires=Sat, 11 Jan 2020 00:00:00 GMT; in its response headers (example.com is the same domain as your URL).
  2. Take a look at the cookies set in the MANAGE COOKIES page. The cookie will read: name=value; path=/; domain=.example.com; expires=Sat, 11 Jan 2020 00:00:00 GMT;. To make sure it was not missed, the problem is the leading . added to the beginning of the domain. This will prevent the cookie from being sent alongside the request if the URL points to a subdomain like www.example.com.

Expected behavior
I was expecting the cookie to be set with the same exact domain and as a result, it should be sent to example.com and all its subdomains.

App information (please complete the following information):

  • App Type: Native App
  • Postman Version: v7.15.0
  • OS: Kubuntu 18.04
  • Postman Interceptor: v0.2.28

Additional context
Of course, you'll need the Interceptor properly set up to work with cookies.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions