Skip to content

Commit

Permalink
Merge pull request #564 from namecheap/feature/allow-data-attr
Browse files Browse the repository at this point in the history
feat(registry): allow data-ilc-instructions attribute in   Link header for css stylesheets
  • Loading branch information
stas-nc authored Dec 11, 2023
2 parents c8a3a07 + a5c8be4 commit eebdf3f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ilc/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"strict": true,
"esModuleInterop": true
},
"exclude": ["node_modules"],
"exclude": ["node_modules", "public"],
"include": ["**/*.ts", "**/*.js"]
}
5 changes: 5 additions & 0 deletions registry/server/templates/services/resources/Attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ const integrity = {
integrity: null,
};

const ilcInstructions = {
'data-ilc-instructions': null,
};

export const Attributes = {
integrity,
crossorigin,
referrerpolicy,
ilcInstructions,
};
1 change: 1 addition & 0 deletions registry/server/templates/services/resources/Resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export abstract class Resource {
protected static allowedAttributes: AllowedAttributes = {
...Attributes.integrity,
...Attributes.crossorigin,
...Attributes.ilcInstructions,
};

constructor(
Expand Down

0 comments on commit eebdf3f

Please sign in to comment.