简体   繁体   English

基于客户端IP地址的金字塔授权

[英]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? 如何根据客户端IP地址(即本地主机)进行授权?

There are two ways by which you can get the client side IP address. 有两种获取客户端IP地址的方法。 Using remote_addr or you can use client_addr . 使用remote_addr或可以使用client_addr

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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