Skip to content
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

Merged
merged 4 commits into from
Jul 21, 2024

Conversation

mishraomp
Copy link
Contributor

@mishraomp mishraomp commented Jul 20, 2024

  1. Added AMS(Posse) URL as env var
  2. Some modifications to code have configs as env vars from hardcoded values.

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:

@mishraomp mishraomp added the auths Relates to authorization documents label Jul 20, 2024
@mishraomp
Copy link
Contributor Author

this one partly solves auth documents as described in #112

DerekRoberts
DerekRoberts previously approved these changes Jul 20, 2024
root * /srv
encode zstd gzip
file_server
@spa_router {
not path /api/*
not path /api/* /env.js
Copy link
Contributor

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?

Copy link
Contributor Author

@mishraomp mishraomp Jul 20, 2024

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}"};`
    }

ccallendar
ccallendar previously approved these changes Jul 20, 2024
Copy link
Contributor

@ccallendar ccallendar left a 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 :)

@mishraomp mishraomp dismissed stale reviews from ccallendar and DerekRoberts via 0ebba60 July 20, 2024 23:01
Copy link

sonarcloud bot commented Jul 20, 2024

Quality Gate Passed Quality Gate passed for 'nr-omrr-transparency-frontend'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@mishraomp mishraomp merged commit 7b10d13 into main Jul 21, 2024
18 checks passed
@mishraomp mishraomp deleted the feat/ams-url-env branch July 21, 2024 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auths Relates to authorization documents
Projects
Status: Ready to Test / Review
Development

Successfully merging this pull request may close these issues.

3 participants