Onebox whitelist missing #2


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

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: 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.

(Joshua Rosenfeld) #2

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.

(Joshua Rosenfeld) #5

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

(Régis Hanol) #6

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’

(Joshua Rosenfeld) #8

Edit: Seems to work just fine here…


It works fine because it is present in the whitelist. Here onebox/whitelisted_generic_onebox.rb at master · discourse/onebox · GitHub

(Joshua Rosenfeld) #10

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


This should not work

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 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

(Régis Hanol) #13

Yeah that’s because of this file


Thank you! I will continue my investigation from there

(Jeff Atwood) #15

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

(Jeff Atwood) closed #16