Skip to content
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

feat: add new attribute to link tag for manifest.json #71

Merged
merged 1 commit into from
Aug 24, 2018

Conversation

gyarasu
Copy link
Contributor

@gyarasu gyarasu commented Jul 6, 2018

In the case of Basic Authentication, manifest.json isn't downloaded properly.
To solve this problem, I added the crossorigin attribute for link tag.
We can set the attribute as below.

modules: [
  ['@nuxtjs/pwa', {manifest: {crossorigin: "use-credentials"}}],
],

As a result, link tag is generated as below.

<link data-n-head="true" rel="manifest" href="/_nuxt/manifest.json" crossorigin="use-credentials"/>

regards
Hiroki

Copy link

@XanderLuciano XanderLuciano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and verified as functional.
Backwards compatible with current manifest file as well.

Have not run into any issues.

@pi0 pi0 merged commit ccb2c33 into nuxt-community:master Aug 24, 2018
@AndrewBogdanovTSS
Copy link

I tried it like @gyarasu suggested

modules: [
  ['@nuxtjs/pwa', {manifest: {crossorigin: "use-credentials"}}],
],

but still crossorigin attribute isn't added to my manifest link, in the source code it appears as

<link data-n-head="true" rel="manifest" href="/site.webmanifest">

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.

5 participants