You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Cookie key header is not being included in the request headers when making API calls through Stoplight Elements.
Interestingly, if we change the name to something other than "Cookie", it appears correctly in the request headers. This suggests that Stoplight Elements may be blocking the Cookie header from being set in the request.
Expected Behavior
The Cookie header should be passed correctly in request headers when defined in OpenAPI security schemes.
Actual Behavior
The Cookie header is missing from the request headers when sent through Stoplight Elements.
Other headers work fine if a different name is used.
Steps to Reproduce
Define an OpenAPI spec with cookieAuth as shown above.
Use Stoplight Elements to make a request to an API requiring this authentication.
Observe that the Cookie header is missing in the request.
Environment
Stoplight Elements Version: [Specify your version]
Browser: [Chrome/Firefox/etc.]
OS: [Windows/macOS/Linux]
Possible Cause
It appears that Stoplight Elements may be intentionally blocking or filtering out the Cookie header. Could this be a security-related restriction?
Additional Context
If this is an intentional limitation, is there a recommended workaround for passing authentication tokens via Cookie headers?
The text was updated successfully, but these errors were encountered:
Description
We are using the
Cookie
header to pass authentication tokens for our APIs:However, when defining this in our OpenAPI spec as follows:
"components": { "securitySchemes": { "cookieAuth": { "type": "apiKey", "name": "SAAS_COMMON_BASE_TOKEN_ID", "in": "cookie" } }, }
The
Cookie
key header is not being included in the request headers when making API calls through Stoplight Elements.Interestingly, if we change the
name
to something other than"Cookie"
, it appears correctly in the request headers. This suggests that Stoplight Elements may be blocking theCookie
header from being set in the request.Expected Behavior
Cookie
header should be passed correctly in request headers when defined in OpenAPI security schemes.Actual Behavior
Cookie
header is missing from the request headers when sent through Stoplight Elements.name
is used.Steps to Reproduce
cookieAuth
as shown above.Cookie
header is missing in the request.Environment
Possible Cause
It appears that Stoplight Elements may be intentionally blocking or filtering out the
Cookie
header. Could this be a security-related restriction?Additional Context
If this is an intentional limitation, is there a recommended workaround for passing authentication tokens via
Cookie
headers?The text was updated successfully, but these errors were encountered: