Skip to content

[Improvement] unify endpoint URL format #2942

@Tsukilc

Description

@Tsukilc

Feature Description

Background

Currently, restserver.url and some other(such as gremlinserver.url, and others in ServerOptions.java) in rest-server.properties requires an explicit scheme prefix such as http://, which can be slightly inconvenient and inconsistent with other modules.

In some components (e.g. Graph AI), URLs without a scheme are supported by defaulting to http, while allowing users to override the scheme explicitly. This provides a more user-friendly configuration experience.

Current Behavior

restserver.url property must include a full scheme, for example:

restserver.url=http://127.0.0.1:8080

If the scheme is omitted, the URL may fail to be parsed or behave unexpectedly.

Expected Behavior

Support a unified and more flexible configuration rule for restserver.url:

Scheme is optional

If no scheme is provided, default to http://

restserver.url=127.0.0.1:8080

Explicit scheme should override the default

restserver.url=http://127.0.0.1:8080
restserver.url=https://127.0.0.1:8080

Proposed Change

During configuration parsing:

If restserver.url does not contain a scheme (e.g. http://, https://), automatically prepend http://

If a scheme is present, preserve the original value

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiChanges of APIdocDocument expectedfeatureNew featuregood first issueGood for newcomershelp wantedExtra attention is neededimprovementGeneral improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions