Monday, 14 September 2020

What CloudFront/S3 doing with HTML/CSS/JS files?

I uploaded to S3 below files:

  • EntryPoint__fd6b122d5ca60cd57ec5.js
  • index.html
  • Main.css

But server returns below content:

enter image description here

Especially the gray one is strange: it does not seems like file. It's name (filename?) is ID from URN:

https://XXXX.com/product/53483ca1-9fd1-4970-841d-e9fbeadd4660

enter image description here

But when I checked the content of EntryPoint__fd6b122d5ca60cd57ec5.js, Main.css, I saw the same HTML code as in picture above (by other words, content of 53483ca1-9fd1-4970-841d-e9fbeadd4660, Main.css and EntryPoint__fd6b122d5ca60cd57ec5.js is even).

I have error:

Uncaught SyntaxError: Unexpected token '<'    
EntryPoint__fd6b122d5ca60cd57ec5.js:1 

To solve this error, first I need to understand what CloudFront/S3 did with my files. What is gray one? Where it's name has been set?

Anyway, it did something wrong: EntryPoint__fd6b122d5ca60cd57ec5.js has HTML content, and certainly JavaScript can not parse it.



from What CloudFront/S3 doing with HTML/CSS/JS files?

No comments:

Post a Comment