Is there a way for pass the StaticSite CDN url to ...
# help
d
Is there a way for pass the StaticSite CDN url to the environments of the StaticSite?
t
This unfortunately isn't possible afaik. Can you tell me why your frontend needs it? I can suggest workarounds
d
Our static site deploys 2 things: 1. script.js (our customers put that on their website) 2. detect.html I need the scripts.js that will be on our customer’s website to be able to redirect to $STATIC_SITE_URL/detect.html
We use customDomain, so we can detect it, I guess it’s the easiest way
t
You could do something in script.js that uses
document.currentScript
to get the dom element
otherwise yeah you should use a custom domain so it's predictable
d
We will go with it then ,thanks