Onebox'ing failing with 418

(RaVoR) #1


I’ve an issue where oneboxing is not working. I always get 418 on onebox-requests. Whats wrong here?


Started GET "/onebox?" for at 2018-01-22 07:45:09 +0000
Processing by OneboxController#show as HTML
  Parameters: {"url"=>"", "refresh"=>"true"}
  Rendering text template
  Rendered text template (0.0ms)
Completed 418  in 5ms (Views: 1.0ms | ActiveRecord: 1.0ms)


(Bhanu Sharma) #2

As per wikipedia,

418 I’m a teapot (RFC 2324)

This code was defined in 1998 as one of the traditional IETF April Fools’ jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites.

and to my best understanding, the link isn’t oneboxing because they do not have any supported meta tags supplied. I checked the link and there were no OG tags present there.

(Sam Saffron) #3

It’s not failing with 418 this is just a quirk in rails logging, look at your nginx logs

(Jeff Atwood) #4

You should always check using but yes this one looks bereft of any opengraph or oEmbed tags.

(RaVoR) #5

So Onebox always need an opengraph or oEmbed tag? If so, is this stated somewhere in documentation?

(Mittineague) #6

You’re looking for these

(shahid) #7

Hi @ravor-org
How did you solve this.
I have a similar scenario, the moment i start typing something which can be taken as a URL e.g. “”, the onebox feature kicks in and tries to create a preview…

Looking at the nginx logs I can see it throws a 404 as its in a invalid URL anyway: - - [18/Jun/2018:14:58:58 +0000] "GET /discussion/onebox? HTTP/1.1" 404 0 "https://mydomain/discussion/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36"

The result is that it displays a blank page and I lose my discourse page.

Anyone know how to make ONEBOX ignore the 404?