I’m not sure it’s a bug - To me it seems like it is.
Let me explain quickly. On my site people can create private recipes. They can then create a special URL to share this private recipe with people. A “token” is added to the query string: http://tjek.nu/r/7x55?token=6d62d94499ac10e (this is a shortened URL) - The onebox’er correctly parses the data and shows a onebox. However, the onebox now links directly to the content: http://e-liquid-recipes.com/recipe/940255 - which won’t work for people beacuse of the missing “token” that was in the original URL (the original sets a session variable and redirects).
My question is this: Shouldn’t the onebox use the original URL that you wanted to share?
I’ve worked around it by adding the token to the redirect and added code to support this in the app…
This one is tricky due to the way the app calculates the final destination for a URL for security reasons. If a URL has several redirects we resolve the final URL and then pass that to onebox for rendering.
I suppose we could pass the original URL through and have the onebox render that if present, but I suspect in most cases you’d prefer to have it link to the redirected content, not the initial content?
The latter seems better to me, but do you guys have a policy about shortlinks in general? Do you expand them for the benefit of the users? I know that the shortlink-services offer statistics, but they wouldn’t work on Discourse… Other than that, the only edge case I can think of is sort of like mine, where the shortlink holds a key to accessing the final URL…