nspcc-dev / gh-push-to-neofs

GitHub action to push things into NeoFS
MIT License
7 stars 2 forks source link

Consider changing NEOFS_HTTP_GATE to HTTP_URL_PREFIX #18

Open roman-khimov opened 6 months ago

roman-khimov commented 6 months ago

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

roman-khimov commented 6 months ago

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 4 months ago

URL_PREFIX makes no sense in this scheme.