PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Unsolved

What to protect download link in Wave?

guppy

Aug 11th, 2020 02:34 PM

I am offering some software for subscribed users to download. What is the proper way to protect those files from being downloaded from unauthorized users? Can i do with routes and middleware a download link which checks if the user auth?

bobbyiliev

Aug 12th, 2020 08:07 AM

Hi ther,

Yes indeed using a middleware sounds like the way to go.

Then I could suggest following the steps from the Laravel documentation on how to handle File Downloads:

https://laravel.com/docs/7.x/responses#file-downloads

Another way to go for this is to add the logic to your Controller and check if the user is authenticated or not and then return the download response.

Report
1