Skip to content

Conversation

@smelukov
Copy link
Member

@smelukov smelukov commented Dec 2, 2019

closes #10059

What kind of change does this PR introduce?

bugfix

Did you add tests for your changes?

no

Does this PR introduce a breaking change?

no

What needs to be documented once your changes are merged?

no

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

@webpack-bot
Copy link
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

@vankop
Copy link
Member

vankop commented Dec 2, 2019

Interesting thing is that browser skip crossorigin attribute if origin is the same and current code is smaller, so maybe better to keep current implementation =)

@vankop
Copy link
Member

vankop commented Dec 2, 2019

Actually regarding to https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attribute , we can optimize setting crossorigin to

function crossOrigin(crossOriginLoading) {
    if (!crossOriginLoading) return false; // missing value default state

    if (crossOriginLoading === 'use-credentials') return '"use-credentials"'; // Use Credentials state

    return '""' // invalid value default state === Anonymous state
}

@vankop
Copy link
Member

vankop commented Sep 15, 2021

original issue #10059 closed .

If it is still a problem for webpack@5 feel free create PR into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants