Support » Plugin: Gravity Forms Entries in Excel » disable download url

  • Resolved Herbert

    (@herbie4)


    Hello Doeke,

    Is there a way to disable the download url?
    I am only using the attachment option.

    best regards, hrbrt

Viewing 6 replies - 1 through 6 (of 6 total)
  • UPDATE
    for now I disabled it via htacces, but removing the option is saver.

    Extra question:
    Are the excel files physically stored somewhere?

    • This reply was modified 6 months, 3 weeks ago by Herbert.
    Plugin Author Doeke Norg

    (@doekenorg)

    Hi @herbie4,

    The files are stored for attachments only, and removed after sending. The download itself is pushed directly to the browser.

    I’ll have to look into the disabling of the url. I’m adding this to the wordpress permalinks array; and it’s kind of the entire point of the plugin ๐Ÿ™‚

    Will get back to you on this.

    The files are stored for attachments only, and removed after sending. The download itself is pushed directly to the browser.

    great!

    Iโ€™ll have to look into the disabling of the url. Iโ€™m adding this to the wordpress permalinks array; and itโ€™s kind of the entire point of the plugin ๐Ÿ™‚

    Good. But for now I blocked it using a htaccess rewrite, so no hurry.

    Have a good weekend!

    • This reply was modified 6 months, 3 weeks ago by Herbert.
    Plugin Author Doeke Norg

    (@doekenorg)

    Hi @herbie4,

    this snippet should help. Place it in your functions.php

    add_filter('request', function ($query_vars) {
        unset($query_vars['gfexcel_action'], $query_vars['gfexcel_hash']);
        return $query_vars;
    }, 0);

    take note of the , 0); this is very important. It should stay below 10.

    This will remove the parts from the url, effectively not triggering the download. Best I can do for the plugin. I must say, your .htaccess solution is a great alternative.

    Hope this helps.

    @doekenorg
    Thank you for the filter and the great plug-in!

    I want to share the .htaccess solution for anyone who needs that to whitelist some ip on the secret download url for extra security or completly block it.
    Just change the xxx.xxx.xxx.xxx to you ip or leave as it is to completly block the url.

    ## START ip filter the download url for gf-excel 
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/gf-entries-in-excel/.*
    RewriteCond %{REMOTE_ADDR} !=xxx.xxx.xxx.xxx
    RewriteRule ^(.*)$ - [R=403,L]
    ## END ip filter the download url for gf-excel
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘disable download url’ is closed to new replies.