dandi / redirector

Apache License 2.0
0 stars 2 forks source link

redirect /{dandisetid} to unversioned URL? #36

Open yarikoptic opened 4 years ago

yarikoptic commented 4 years ago

ATM it redirects to /draft

$> wget -S https://dandiarchive.org/dandiset/000027
--2020-09-09 17:51:52--  https://dandiarchive.org/dandiset/000027
Resolving dandiarchive.org (dandiarchive.org)... 3.12.21.28
Connecting to dandiarchive.org (dandiarchive.org)|3.12.21.28|:443... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 302 Found
  Server: nginx/1.14.0 (Ubuntu)
  Date: Wed, 09 Sep 2020 21:51:54 GMT
  Content-Type: text/html; charset=utf-8
  Content-Length: 0
  Connection: keep-alive
  Location: https://gui.dandiarchive.org/#/dandiset/000027/draft
  Access-Control-Allow-Origin: *
Location: https://gui.dandiarchive.org/#/dandiset/000027/draft [following]

Web UI redirects https://gui.dandiarchive.org/#/dandiset/000027 to the most recent release (i.e. https://gui.dandiarchive.org/#/dandiset/000027/0.200721.2222). IMHO whatever decision it is, it should be consistent between the two (redirector and web ui). And likely the easiest way to achieve by redirector -- to redirect to the unversioned dandiset landing page, i.e. https://gui.dandiarchive.org/#/dandiset/000027 and then letting web UI redirect if it feels like so.

I ran into this discrepancy while thinking about https://github.com/dandi/dandi-cli/issues/236 somewhat

mgrauer commented 4 years ago

I agree with this, and I'd prefer to not have redirection in the GUI.