Consider changing NEOFS_HTTP_GATE to HTTP_URL_PREFIX #14

Open
opened 2025-12-28 18:15:44 +00:00 by sami · 2 comments
Owner

Originally created by @roman-khimov on GitHub (Mar 28, 2024).

I'm always frustrated when we're referring to outdated components (HTTP gateway) and using instance-specific configurations by default (/$CID/path only works because of rewrites, it's not a native HTTP or REST interface). There also can be cases where people run a gate of their own with some better URL scheme (like reports.example.com/path) and NEOFS_HTTP_GATE puts too many restrictions on them (implying /$CID/path)

Describe the solution you'd like

Rework NEOFS_HTTP_GATE into HTTP_URL_PREFIX (but keep old one for compatibility unles HTTP_URL_PREFIX is set), this would work like

HTTP_URL_PREFIX=https://rest.fs.neo.org/$CID/
HTTP_URL_PREFIX=https://reports.nspcc.io/

leaving gateway/rewrite specifics out of scope.

Additional context

https://github.com/nspcc-dev/neofs-rest-gw/issues/156

Originally created by @roman-khimov on GitHub (Mar 28, 2024). ## Is your feature request related to a problem? Please describe. I'm always frustrated when we're referring to outdated components (HTTP gateway) and using instance-specific configurations by default (`/$CID/path` only works because of rewrites, it's not a native HTTP or REST interface). There also can be cases where people run a gate of their own with some better URL scheme (like `reports.example.com/path`) and NEOFS_HTTP_GATE puts too many restrictions on them (implying `/$CID/path`) ## Describe the solution you'd like Rework NEOFS_HTTP_GATE into HTTP_URL_PREFIX (but keep old one for compatibility unles HTTP_URL_PREFIX is set), this would work like ``` HTTP_URL_PREFIX=https://rest.fs.neo.org/$CID/ HTTP_URL_PREFIX=https://reports.nspcc.io/ ``` leaving gateway/rewrite specifics out of scope. ## Additional context https://github.com/nspcc-dev/neofs-rest-gw/issues/156
Author
Owner

@roman-khimov commented on GitHub (Mar 28, 2024):

In fact, BASE_URL that's used internally is exactly that, it just needs to be exposed properly. And it includes URL_PREFIX as well.

@roman-khimov commented on GitHub (Mar 28, 2024): In fact, `BASE_URL` that's used internally is exactly that, it just needs to be exposed properly. And it includes `URL_PREFIX` as well.
Author
Owner

@roman-khimov commented on GitHub (May 15, 2024):

URL_PREFIX makes no sense in this scheme.

@roman-khimov commented on GitHub (May 15, 2024): `URL_PREFIX` makes no sense in this scheme.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/gh-push-to-neofs#14
No description provided.