vendredi 27 octobre 2017

Build a website in private cloud network

Now, I have a web application built for public cloud network. Our resource is located in CDN like this:

index.html:
<html>
<script src="http://ift.tt/2zISmAs">
<script src="http://mycnd.com/app.js"></scirpt>
<link rel="stylesheet" type="text/css" href="http://mycdn/app.css">
</html>

app.css:
.container {
    background: url(http://ift.tt/2hfKjnG)
}

app.js:
let list = ['a.png', 'b.png'];
list = list.map((name)=>`http://mycdn.com/${list}`)
for(var img of list) { new Image(img) }

And we are going to deploy this web application in private cloud network. The user isn't able to download resource in external CDN. So I think I should write a script to download all resource in the code and replace the resource path with new path in the backend server. Is there any tool to do this?

Furthermore, in the app.js example, the image url is created dynamically, I think it's not possible to parse the resource in this case. Any idea?




Aucun commentaire:

Enregistrer un commentaire