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
{{ message }}
Repository navigation
headers for dev-server not working anymore after upgrade from angular 16 to 17 #27464
they are not present in the initial localhost (index.html) request. All subsequent requests contains the headers.
When creating a new angular 16 app and adding the same config it works for the initial request as well.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
In the real code we see the error `Uncaught ReferenceError: SharedArrayBuffer is not defined` due to the missing headers.
Please provide the environment you discovered this bug in (run ng version)
@PJozeph, the production section solely effects the development server when executed with the production configuration ie: ng serve --configuration=production. In this scenario, the headers configuration is redundant, as it duplicates the one configured in the base options.
These settings do not affect your production server, as the configuration of the production server is outside the Angular CLI's.
Activity
NetWin commentedon Apr 14, 2024
I just noticed the same / a similar issue. These headers are also not available for
/mediafiles (i.e. files embedded / referenced from css files)Using the "old" browser builder with a random custom header for demo purposes,
results in these response headers (i simply
@import'ed the primeicons css file in mystyles.scss):But after updating (and switching to the application builder) the custom header is gone.
Additionally there is no
Access-Control-Allow-Originheader anymore which is another problem for me. But that's not part of this Github issuePJozeph commentedon Apr 23, 2024
same issue here
fix(@angular/build): properly configure headers for media resources a…
fix(@angular-devkit/buid-angular): properly configure headers for med…
fix(@angular-devkit/build-angular): properly configure headers for me…
fix(@angular/build): properly configure headers for media resources a…
fix(@angular-devkit/build-angular): properly configure headers for me…
PJozeph commentedon Apr 24, 2024
so this is fixed ? if yes in which version ?
alan-agius4 commentedon Apr 24, 2024
Yes, it be released on NPM later on today.
PJozeph commentedon Apr 26, 2024
@alan-agius4

For mw it work only locally, but not on PROD !
Is this the correct way of config ?
alan-agius4 commentedon Apr 26, 2024
@PJozeph, for the production server you need to configure your production server which settings will vary based on which server you are using.
The settings in
angular.jsonare only apply to the development server.alan-agius4 commentedon Apr 26, 2024
@PJozeph, the
productionsection solely effects the development server when executed with the production configuration ie:ng serve --configuration=production. In this scenario, theheadersconfiguration is redundant, as it duplicates the one configured in the base options.These settings do not affect your production server, as the configuration of the production server is outside the Angular CLI's.
PJozeph commentedon Apr 26, 2024
@alan-agius4 I am really appreciate your help, thank you !
This is how I fixed the issue on PROD !
angular-automatic-lock-bot commentedon May 27, 2024
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.