title: Glide image loading with redirect
body: <p>I'm trying to load image from url using glide. But the url is redirection to another url and hence the image is not being displayed. </p>
  
  <p>The url is of Amazon s3 and I'm using volley integration with glide</p>
  
  <p>How can I handle this redirection?</p>
  
  <pre><code>public class CustomCache implements GlideModule {
  @Override
  public void applyOptions(Context context, GlideBuilder builder) {
      try {
          builder.setDiskCache(
                  new InternalCacheDiskCacheFactory(context, 41943040)
          );
      } catch (Exception e) {
          e.printStackTrace();
      }
  
  }
  
  @Override
  public void registerComponents(Context context, final Glide glide) {
      RequestQueue queue = new RequestQueue( // params hardcoded from Volley.newRequestQueue()
              new DiskBasedCache(new File(context.getCacheDir(), "volley")),
              new BasicNetwork(new HurlStack())) {
          @Override public &lt;T&gt; Request&lt;T&gt; add(Request&lt;T&gt; request) {
              request.setRetryPolicy(new DefaultRetryPolicy(60000, 1, 1));
  
              return super.add(request);
          }
      };
      queue.start();
      glide.register(GlideUrl.class, InputStream.class, new VolleyUrlLoader.Factory(queue));
  }
  
  
  }
  </code></pre>