简体   繁体   中英

Pyramid authorization based on client IP address

I successfully setup authentication and user based authorization following the pyramid documentation .

Now I want to disable this authorization if the side is accessed from localhost. How can I make my authorization depending on the client IP address, ie localhost?

There are two ways by which you can get the client side IP address. Using remote_addr or you can use client_addr .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM