You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
need the attribute crossorigin="use-credentials" to be working, as the
It also seems, that Safari is a little bit stricter here, then chrome. Chrome just needs the attribute for the manifest, Safari for both.
If crossorigin is not provided, the browsers throw errors like:
https://login.microsoftonline.com/XXXXX/oauth2/authorize?response_type=code+id_token&redirect_uri=https%3A%2F%2Fapp.azurewebsites.net%2F.auth%2Flogin%2Faad%2Fcallback&client_id=XXXXX&scope=openid+profile+email&response_mode=form_post&resource=https%3A%2F%2Fgraph.windows.net&nonce=XXXXX&state=redir%3D%252Fmain-es2015.3959c9c93c3c451fefc1.js
denied by Cross-Origin Resource Sharing policy: Origin
https://app.azurewebsites.net is not allowed by Access-Control-Allow-Origin.
Both workarounds are fine for us, but I think others would like to have an option to configure crossorigin for modules.
🚀 Feature request
Command (mark with an x)
- [X] build
Description
Add a compiler option:
p.E. moduleCrossorigin - off | '' | anonymous | use-credentials
Describe the solution you'd like
Generated script tags in index.html should get an additional attribute if the new compilerOption is set:
If moduleCrossorigin is not set: <script type="module" src="…">
If moduleCrossorigin is '' or anonymous: <script type="module" crossorigin="anonymous" src="…">
If moduleCrossorigin is use-credentials: <script type="module" crossorigin="use-credentials" src="…">
Describe alternatives you've considered
Described manual replacements via npm scripts above.
The text was updated successfully, but these errors were encountered:
We are using a transparent authentication gateway from Azure (https://docs.microsoft.com/de-de/azure/app-service/overview-authentication-authorization) in front of our applications. It captures all requests and some 'new' tags like:
need the attribute
crossorigin="use-credentials"
to be working, as theIt also seems, that Safari is a little bit stricter here, then chrome. Chrome just needs the attribute for the manifest, Safari for both.
If crossorigin is not provided, the browsers throw errors like:
Some infos about the attribute:
https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes
We already did some tests:
First we changed "target": "es2015" to "target": "es5" in tsconfig.json
-> the application works
Then we moved back to es2015 and added a npm build step to our pipeline (thanks to @manfredsteyer)
-> the application works
Both workarounds are fine for us, but I think others would like to have an option to configure crossorigin for modules.
🚀 Feature request
Command (mark with an
x
)Description
Add a compiler option:
Describe the solution you'd like
Generated script tags in index.html should get an additional attribute if the new compilerOption is set:
If moduleCrossorigin is not set:
<script type="module" src="…">
If moduleCrossorigin is '' or anonymous:
<script type="module" crossorigin="anonymous" src="…">
If moduleCrossorigin is use-credentials:
<script type="module" crossorigin="use-credentials" src="…">
Describe alternatives you've considered
Described manual replacements via npm scripts above.
The text was updated successfully, but these errors were encountered: