forked from GNUsocial/gnu-social
Use short API-style error responses for LinkPreview's oembed proxy
This commit is contained in:
parent
da8b268e06
commit
fb1fc8a046
@ -50,6 +50,9 @@ class OembedproxyAction extends OembedAction
|
|||||||
|
|
||||||
function handle($args)
|
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.
|
// We're not a general oEmbed proxy service; limit to valid sessions.
|
||||||
$token = $this->trimmed('token');
|
$token = $this->trimmed('token');
|
||||||
if (!$token || $token != common_session_token()) {
|
if (!$token || $token != common_session_token()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user