antonioribeiro / firewall

Firewall package for Laravel applications
BSD 3-Clause "New" or "Revised" License
1.39k stars 163 forks source link

[Question] Comments in .txt configs #136

Closed OwenMelbz closed 4 years ago

OwenMelbz commented 5 years ago

Hi - is it possible to to add comments to file based configs?

e.g. if we wanted.....

// Johns home IP
12323.23.23.2.32.3

// Office IP
2321432432423

// Intranets
123321313
12312321312
123213213

Thanks :)

antonioribeiro commented 4 years ago

yes, it's a PHP File, you can do this:

'blacklist' => [
    // localhost
    '127.0.0.1',
    '127.0.0.1/255.255.255.255',

    // my server
    '192.168.17.0/24',

    // company network
    '10.0.0.1-10.0.0.255',

    // whatever
    '172.17.*.*',

    // whole country
    'country:br',

    // google
    'host:google.com',
],
OwenMelbz commented 4 years ago

@antonioribeiro Hi, please consider re-opening until this is resolved.

My question was NOT about PHP configs, it is about using TEXT files (as per subject title)

E.g if I had blacklist.txt

Thanks