-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(frontend): code changes to add env vars and make AMS URL available #179
Conversation
this one partly solves auth documents as described in #112 |
root * /srv | ||
encode zstd gzip | ||
file_server | ||
@spa_router { | ||
not path /api/* | ||
not path /api/* /env.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this meant to be /env.ts
? Or does that file get compiled to env.js
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the /env.js is a new route which will browser will call out, I will add the missing code :).
below section in Caddyfile handles the callout.
handle /env.js {
header {
Content-Type text/javascript
}
respond `window.config={"VITE_AMS_URL":"{$VITE_AMS_URL}"};`
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I did ask one comment about the Caddyfile, but I assume what you have is correct :)
…o provide /env.js
Quality Gate passed for 'nr-omrr-transparency-frontend'Issues Measures |
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: