I ran into an interesting problem today. On my dev environment authentication was working fine. However on production the “Authorization” header was not being sent. After hours of debug CORS and other related things, I decided to check out my webpack config. It was created by ejecting: create-elm-app
From there I disabled the UglifyJS plugin and everything worked as expected. I doubled checked, enabling UglifyJS broke the HTTP request. I then undid all the other changes I made attempting to debug, and tried again. As far as I can tell, UglifyJS was the issue. I don’t know if this is relevant but I am using HttpBuilder to builder request.
I was wondering if I missed something or did I just find a weird quirk of UglifyJS interacting with Elm.
Here is my webpack config, on line 219 you can see the UglifyJS plugin being commented out.
Perhaps you could try commenting out the options passed to the uglify plugin and see if it works? Then you could enable them again one by one to narrow down the issue. Perhaps one of those “pure_funcs” listed is the issue?