forked from Archives/Athou_commafeed
prevent use of proxy if option is disabled
This commit is contained in:
@@ -34,6 +34,10 @@ public class ServerREST extends AbstractResourceREST {
|
||||
@ApiOperation(value = "proxy image")
|
||||
@Produces("image/png")
|
||||
public Response get(@QueryParam("u") String url) {
|
||||
if (!applicationSettingsService.get().isImageProxyEnabled()) {
|
||||
return Response.status(Status.UNAUTHORIZED).build();
|
||||
}
|
||||
|
||||
url = FeedUtils.imageProxyDecoder(url);
|
||||
try {
|
||||
HttpResult result = httpGetter.getBinary(url);
|
||||
|
||||
Reference in New Issue
Block a user