-
-
Notifications
You must be signed in to change notification settings - Fork 919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding /version route. Fixes #2914 #4059
Conversation
It seems a bit misleading to call it @MV-GH @buresdv You can see the data format this would return here. Is that what you expect, or rather a plain version string? |
Well originally, before I knew about nodeinfo, i wanted an endpoint that just returns version. But from experience, I know that people sometimes try other activitypub software in lemmy clients. So now I can handle that. So the only problem I had was discoverability of this endpoint. If version only returns version but also documents the above endpoint that's absolutely fine for me. |
I can totally change it to a plain version string. I'd just thought that extra info might be useful, especially the software one. |
@MV-GH mentions that the problem is with discovery of the endpoint. Based on that, I think a redirect would be the best solution. |
If this endpoint documents the other too, Then we have best of both worlds. It will then automatically be pulled into my openapi spec Don't see much value in having two endpoints that return the same data |
So just an nginx redirect to the nodeinfo endpoint? |
Yes |
Like I said in the ansible PR, I would be fine with doing the redirect in Rust. Misread your previous comment on that. |
That's what I had it as originally, version and nodeinfo being the same route. Lets just go with the nginx one I think. |
Im not talking about two different endpoints which return the same data, but a redirect with HTTP status 30x. https://docs.rs/actix-web/latest/actix_web/web/struct.Redirect.html |
I'll add this to the lemmy-ansible nginx also.