Skip to content

Commit

Permalink
Merge pull request #258 from serafimsanvol/feat/cross-origin-for-mani…
Browse files Browse the repository at this point in the history
…fest-link

Add crossOrigin to ManifestLink to be able to fix CORS issues
  • Loading branch information
ShafSpecs authored Sep 4, 2024
2 parents e98e28c + 7528a69 commit 570216f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/sw/src/components/ManifestLink.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import type { LinkHTMLAttributes } from 'react';
import React from 'react';

export const ManifestLink = ({ manifestUrl = '/manifest.webmanifest' }: { manifestUrl?: string }) => {
return <link rel="manifest" href={manifestUrl} />;
export const ManifestLink = ({
crossOrigin,
manifestUrl = '/manifest.webmanifest',
}: {
manifestUrl?: string;
crossOrigin?: LinkHTMLAttributes<HTMLLinkElement>['crossOrigin'];
}) => {
return <link rel="manifest" href={manifestUrl} crossOrigin={crossOrigin} />;
};

0 comments on commit 570216f

Please sign in to comment.