Skip to content

Commit

Permalink
fix(build): default to upstream API if no env var is set (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
kahboom committed Mar 19, 2024
2 parents 0ef4390 + 46c13aa commit d1d515a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/modules/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function Settings({
fieldId="rekor-endpoint-override"
>
<TextInput
value={localBaseUrl ?? ""}
value={localBaseUrl ?? "https://rekor.sigstore.dev"}
type="text"
onChange={handleChangeBaseUrl}
placeholder={
Expand Down
8 changes: 5 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ export default PageComponent;
export async function getServerSideProps() {
return {
props: {
NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN:
process.env.NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN,
}, // will be passed to the page component as props
NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN: process.env
.NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN
? process.env.NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN
: null,
}, // gets passed to the page component as props
};
}

0 comments on commit d1d515a

Please sign in to comment.