I now need to prepend a slash to all of my nodes inside the app! Is that right? Is that considered a good practice? Somehow it does not sound like a good practice to me. I’m more used to have paths of the type “my-path/” or “my-path” but never “/my-path”.
Please tell me if you have any experience on this and whether you think this pattern is common.
I can understand why you might not want a trailing slash on your url, but I’m not sure I understand why you would be concerned about a trailing slash on an earlier segment of the url.
This is one of those situations in which I don’t really have a good answer to that, mainly because I’m not sure what other people do. My only motivation was to have this situation:
I’m currently on https://localhost:8000/oglasi/. Do you think that /oglasi/?strana=1 looks better than /oglasi?strana=1? I don’t think so. How do I make it the other way?
In fact, my initial motivation to have api endpoint not ending with a slash is the use case you present. I wanted to avoid the clashing /? (which I personally don’t like). But I see no other compromise than the one suggested above.