I'm trying to deploy an angular app to a Google Cloud Storage bucket so 
that I can serve the app from there. The bucket has has public access and 
is named so that I can serve it as a custom website via CNAME (let's say 
test.example.com). The bucket is also configured to map the main page to 
index.html and the 404 handler to index.html. When loading 
https://test.example.com, most of the app loads fine, but any of the assets 
that are loaded via XHR (GET from /assets/) get a HTTP 401 error. There are 
no preflight requests. I've tried setting various permutations of CORS 
settings on the bucket, but nothing seems to help.

I am getting this on loading on assets.

<?xml version='1.0' 
encoding='UTF-8'?><Error><Code>AuthenticationRequired</Code><Message>Authentication
 
required.</Message></Error>

Can anyone help me out.

We are using Google storage and Google DNS Hosting for this.

Below link is for reference: 
https://html.developreference.com/article/10228923/401+error+with+Angular+app+deployed+to+Google+Cloud+Storage+with+CNAME%27d+DNS

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/319a3552-6a62-4316-be09-4f645f373fc1%40googlegroups.com.

Reply via email to