1.0.0-beta.5: Allow `whitelistedDomains` to be disabled or specified via wildcards
See original GitHub issueOur webservice URL is not hard-coded but rather retrieved at runtime, therefore it’s not possible to hard-code our whitelisted domains when importing JwtModule.forRoot()
.
It would be helpful to be able to disable whitelisting and/or allow for wildcards.
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Cannot use wildcard in Access-Control-Allow-Origin when ...
Edit 1: I've been using chrome --disable-web-security , but now want things to actually work. Edit 2: Answer: So, solution for me django-cors-headers...
Read more >Examples of wildcard characters
Wildcards are special characters that can stand in for unknown characters in a text value and are handy for locating multiple items with...
Read more >Wildcards and Destination Lists
Every domain in a block or allow destination list has an implied left side and right side wildcard.Note: Asterisks () are not supported....
Read more >Wildcards in table mapping
This section describes wildcards you can use when specifying the schema and table names for table mapping.
Read more >How do I add Domain Wildcards to My Block or Allow Lists?
Adding wildcards to your block or allow lists is accomplished by an implied wildcard.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I finally found a solution.
export function getToken () { return localStorage.getItem(tokenName); }
export const whitelistedDomains = [new RegExp('[\s\S]*')] as RegExp[];
export function jwtOptionsFactory() { return { tokenGetter: getToken, whitelistedDomains: whitelistedDomains }; }
In the imports:JwtModule.forRoot({ jwtOptionsProvider: { provide: JWT_OPTIONS, useFactory: jwtOptionsFactory } })
Are you using angular-cli/aot?
after
ng build --prod
I get onlywhitelistedDomains:['string']