Skip to content

feat(HtmlPwaPlugin): adds 'manifestCrossorigin' option #3939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2019

Conversation

BigsonLvrocha
Copy link
Contributor

close #3933

@bluebrown
Copy link

Thanks for implementing this! I am little confused how to use it.

@BigsonLvrocha
Copy link
Contributor Author

BigsonLvrocha commented May 20, 2019

In some specific cases the PWA is served behind an authenticated proxy (corporate network), so the request for the manifest.json file might return 401 - Unauthorized error. The solution to this is to add the attribute crossorigin=use-credentials in the include tag. Info about it. Currently there is no setup for that in the plugin, so I added that setting. So, if you need this, you need to setup this in your vue.config.js as below

module.exports = {
  pwa: {
    manifestCrossorigin: 'use-credentials',
  },
};

And it will add the attribute to the tag in the generated index.html file

@bluebrown
Copy link

bluebrown commented May 20, 2019

Thanks so much for taking your time to clarify. I will see if I can find a good place in the documentation, and update the info via pull request. (If its not already there).

@haoqunjiang haoqunjiang merged commit 49725b4 into vuejs:dev May 25, 2019
@vue-bot
Copy link

vue-bot commented May 25, 2019

Hey @BigsonLvrocha, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

haoqunjiang pushed a commit that referenced this pull request May 25, 2019
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.

[@vue/pwa] add option to configure crossorigin tag in manifest link in generated index.html
4 participants