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
esbuild with proxy doesn't return Content-Language headers for OPTIONS request #26782
Which @angular/* package(s) are the source of the bug?
upgrade, Don't known / other
Is this a regression?
Yes
Description
I upgraded my project to Angular 17 and switched to "builder": "@angular-devkit/build-angular:browser-esbuild". For local env I use proxy config to redirect requests to test env.
I receive all the data, except for OPTIONS request there is no Content-Language header in response.
It works on prev version(Angular 16 and "builder": "@angular-devkit/build-angular:browser")
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version)
changed the title [-]esbuild with proxy doesn't return Content-Language headers[/-][+]esbuild with proxy doesn't return Content-Language headers for OPTIONS request[/+]on Jan 3, 2024
Hi @mivanyna, to speed up our investigation kindly provide a minimal reproduction.
A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
That being said, it's unlikely this is a bug from our end as proxy is handled by Vite.
@mivanyna, following an offline convo with @clydin, he correctly pointed out that an OPTIONS response has no content and thus, what is the reason of having a content-language header in the first place?
@mivanyna, unfortunately, I was not able yet to look into this issue. As mentioned above, it would definitely speed up the process if you share a minimal reproduction.
Hi @mivanyna, look at this issue: #25337
I think you have the same problem - the array form of proxy configuration is not yet supported by Vite. Instead you should do it like this:
Activity
[-]esbuild with proxy doesn't return Content-Language headers[/-][+]esbuild with proxy doesn't return Content-Language headers for OPTIONS request[/+]mivanyna commentedon Jan 4, 2024
Please let me know if you need something from me
mivanyna commentedon Jan 5, 2024
This one is very critical for me as it blocks development of some parts of the app
alan-agius4 commentedon Jan 5, 2024
Hi @mivanyna, to speed up our investigation kindly provide a minimal reproduction.
A good way to make a minimal repro is to create a new app via
ng new repro-appand adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.That being said, it's unlikely this is a bug from our end as proxy is handled by Vite.
alan-agius4 commentedon Jan 5, 2024
@mivanyna, following an offline convo with @clydin, he correctly pointed out that an
OPTIONSresponse has no content and thus, what is the reason of having acontent-languageheader in the first place?mivanyna commentedon Jan 5, 2024
@alan-agius4 I get localizations in the header so I can then fetch the data with GET for the locale
mivanyna commentedon Jan 11, 2024
Hi there, were you able to reproduce the issue?
alan-agius4 commentedon Jan 11, 2024
@mivanyna, unfortunately, I was not able yet to look into this issue. As mentioned above, it would definitely speed up the process if you share a minimal reproduction.
ipranjic commentedon Jan 12, 2024
Hi @mivanyna, look at this issue: #25337
I think you have the same problem - the array form of proxy configuration is not yet supported by Vite. Instead you should do it like this:
mivanyna commentedon Jan 12, 2024
Hi @ipranjic , I don't think it's the case as I get all other data(GET, POST, etc)
mivanyna commentedon Jan 12, 2024
@alan-agius4 here is the repo.
What I noticed is that even if the backend server is not running I get the response for OPTIONS request, seems like the dev-server returns it.
alan-agius4 commentedon Jan 15, 2024
@mivanyna, I managed to find the root cause and will be opening a PR shortly.
fix(@angular-devkit/build-angular): alllow `OPTIONS` requests to be p…
fix(@angular-devkit/build-angular): alllow `OPTIONS` requests to be p…
fix(@angular-devkit/build-angular): alllow `OPTIONS` requests to be p…
mivanyna commentedon Jan 16, 2024
Thanks @alan-agius4
angular-automatic-lock-bot commentedon Feb 16, 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.