]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Use short API-style error responses for LinkPreview's oembed proxy
authorBrion Vibber <brion@pobox.com>
Mon, 6 Dec 2010 21:37:57 +0000 (13:37 -0800)
committerBrion Vibber <brion@pobox.com>
Mon, 6 Dec 2010 21:37:57 +0000 (13:37 -0800)
plugins/LinkPreview/oembedproxyaction.php

index 470f7807312878da6fb97f9d5fda6ec9b13638e3..bc80ee5cf9548cbaf963adf5365a9f73a211c906 100644 (file)
@@ -50,6 +50,9 @@ class OembedproxyAction extends OembedAction
 
     function handle($args)
     {
+        // Trigger short error responses; not a human-readable web page.
+        StatusNet::setApi(true);
+
         // We're not a general oEmbed proxy service; limit to valid sessions.
         $token = $this->trimmed('token');
         if (!$token || $token != common_session_token()) {