Ipfilter exception path

Does ipfilter support exception paths?

ipfilter /api/users { 
    rule allow
    ip 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8
}

/api/users only allow LAN access, /api/users/1 this path requires public network access.
How to achieve?

I don’t see any capability like that in ipfilter.

You could achieve this functionality on a case-by-case basis with separate site definition blocks:

example.com {
  root /var/www/html
  ipfilter /api/users {
    rule allow
    ip 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8
  }
}
example.com/api/users/1 {
  root /var/www/html/api/users/1
}

Thx for your help.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.