Viewing 1 replies (of 1 total)
  • Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @luizargument

    WP Offload Media Support Team here. Thanks for reaching out with your query, we would be happy to assist!

    This is possible, but you would have to use our Tweaks plugin.
    Edit the?object_meta function with something like the following –?

    function object_meta( $args, $post_id, $image_size, $copy ) {
    $args[‘Referer’] = get_attachment_link($post_id);
    }

    Then finally, to actually get WP Offload Media to start using this functionality, uncomment the add_filter( 'as3cf_pre_upload_attachment', ... line in the?__construct?function.

    A few things to note are, this code is untested, have only based it on the following –
    https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer
    https://developer.www.ads-software.com/reference/functions/get_attachment_link/
    You may need to change it a bit for it to output the intended header.

    Lastly, This filter would only apply to newly offload media items, as that’s the only time the S3 Bucket receives these headers. WP Offload Media Lite do not have the capability to re-offload your Media Library items. You will either have to re-upload them to the media library or upgrade to the pro version.

    Thank you.

Viewing 1 replies (of 1 total)
  • The topic ‘Redirection with referer header’ is closed to new replies.