这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@paivagustavo
Copy link
Contributor

Elements "Try It" feature defaults to omitting credentials cookies, which causes APIs authenticated with cookies not to work.

This PR changes elements credentials policy to same-origin, just like the default for a fetch request :

Send user credentials (cookies, basic http auth, etc..) if the URL is on the same origin as the calling script. This is the default value.

@codecov
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a1f5e0b) 94.51% compared to head (3eb6eb5) 94.51%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #254   +/-   ##
=======================================
  Coverage   94.51%   94.51%           
=======================================
  Files          18       18           
  Lines        2660     2661    +1     
=======================================
+ Hits         2514     2515    +1     
  Misses        107      107           
  Partials       39       39           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danielgtaylor danielgtaylor merged commit e99f2bd into danielgtaylor:main Feb 20, 2024
@danielgtaylor
Copy link
Owner

@paivagustavo thanks!

@paivagustavo paivagustavo deleted the pass-cookies-if-same-origin branch February 21, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants