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 · GitHub 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: search for 'url', not 'image', if oembed is of 'photo' type by orangefour · Pull Request #331 · discourse/onebox · GitHub

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’

Edit: Seems to work just fine here…

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

Probably because this forum is not running the latest git version of discourse. On my VirtualBox installation this link does not work http://www.mobypicture.com/user/Henk_Voermans/view/15880044

Yeah that’s because of this file

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

Thank you! I will continue my investigation from there

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