Onebox whitelist missing #2

Sorry I have to create a thread again, because my previous thread was closed

https://meta.discourse.org/t/onebox-whitelist-missing/52000/3

Unfortunately if domain is not whitelisted in whitelisted_generic_onebox.rb it won’t be oneboxed. I am doing a test with my domain, and I don’t even receive GET request. I also tried to test with rake server as suggested here GitHub - discourse/onebox: (DEPRECATED) A gem for turning URLs into website previews and it is the same behaviour.

The domain has to be whitelisted it seems. And it is stated in onebox documentation

  1. The domain must be whitelisted

I and I could not find you are doing any whitelisting in the discourse codebase.

What exactly are you trying to onebox? Does it work here on Meta?

I am trying to onebox jpg image. I have my local installation of discourse on VirtualBox where I am trying to make this work. By the way there is a bug in onebox implementation. Here’s the pull request: https://github.com/discourse/onebox/pull/331

I managed to onebox with rake server when I add my domain to whitelisted_generic_onebox.rb. Otherwise it doesn’t work. As I said earlier, onebox doesn’t even try to GET if the domain is not whitelisted.

I’m not a Ruby developer so the PR is beyond me. Regardless, does whatever you are trying to embed work here on Meta or on http://try.discourse.org?

Could you share the link you’re trying to onebox. I’M actually working on fixing an improving our oEmbed and OpenGraph support.

Unfortunately I can not share the link, but the effect can be observed if you remove 23hq from onebox whitelist and test this url: 23: Kai Krause - mprove
It has oembed type of ‘photo’

23: Kai Krause - mprove

Edit: Seems to work just fine here…

1 Like

It works fine because it is present in the whitelist. Here https://github.com/discourse/onebox/blob/master/lib/onebox/engine/whitelisted_generic_onebox.rb#L19

OK then, can you share an example that isn’t in the whitelist?

This should not work

http://www.mobypicture.com/user/Henk_Voermans/view/15880044

Though it does. Now I’m puzzled

1 Like

Probably because this forum is not running the latest git version of discourse. On my VirtualBox installation this link does not work Wat begonnen bij 'n flets zonnetje tot de middag.Daarna werd het zonniger en hier nog 23 graden om 18.55 uur in het Liniepark in Breda tijdens 'n wandeling. #buienradar by Henk Voermans , Breda (Henk_Voermans) on Mobypicture

Yeah that’s because of this file

https://github.com/discourse/discourse/blob/master/lib/onebox/engine/whitelisted_generic_onebox.rb

1 Like

Thank you! I will continue my investigation from there

1 Like

There is no more whitelist as of a few days ago. ALL URLS ARE WHITELISTED.

5 Likes