Skip to content

Hard-wired URLs in the source code #92

@dboreham

Description

@dboreham

There are a few places in the code where the deployment URL (e.g. https://scan.openlibra.io) is present in the code.
Problematic in terms of coupling the deployment of one instance of the code into code that should be deployable anywhere.

Cases:

OpenGraph metadata tags:
https://github.com/0LNetworkCommunity/explorer/blob/main/web-app/index.html#L21
The OG people messed this up -- it's not possible to use a relative URL here so we need
to find a way to inject the deployed URL at either deploy time or run time.

Non-configurable config:
https://github.com/0LNetworkCommunity/explorer/blob/main/web-app/src/config.ts#L19

and:
https://github.com/0LNetworkCommunity/explorer/blob/main/web-app/src/modules/aptos/Provider.tsx#L7

These seems simple enough to inject from an environment variable.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions