fix errors for api to be json

This commit is contained in:
Oliver Gorwits
2019-03-20 21:18:12 +00:00
parent 1e32f802f8
commit 52e2751b50
3 changed files with 9 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ Whether the request should be interpreted as an API call.
sub request_is_api {
return (setting('api_token_lifetime')
and request->accept =~ m/(?:json|javascript)/
and index(request->path, uri_for('/api')->path) == 0);
and index(var('orig_path'), uri_for('/api')->path) == 0);
}
=head2 sql_match( $value, $exact? )