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

fix(build): default to upstream API if no env var is set #40

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

kahboom
Copy link
Collaborator

@kahboom kahboom commented Mar 19, 2024

This PR fixes a breaking build where if you do not specify NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN as an environment variable it returns undefined which is not serializable by JSON. In addition, the Rekor Search UI will be unusable unless a Rekor server baseUrl is provided.

Changes:

  • returns null instead of undefined for NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN as a server-side prop, to make the environment variable serializable (and prevent the build from failing)
  • reimplements the same approach as upstream, defaulting to the upstream API again if nothing has been set, so that the UI has some functionality in the meantime

Copy link
Member

@lance lance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@kahboom kahboom merged commit d1d515a into main Mar 19, 2024
13 of 14 checks passed
@kahboom kahboom deleted the env-default branch March 19, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants