简体   繁体   English

检查重定向域名

[英]Check for domain name in redirection

We have a web application on a domain. 我们在域上有一个Web应用程序。 Now another domain will use this application by doing a 301 redirection to former domain. 现在,另一个域将通过执行到先前域的301重定向来使用此应用程序。 What are ways to safeguard the app. 有哪些方法可以保护应用程序。 So that no one can access it directly. 这样没人能直接访问它。 Referrer check is one way, but not reliable. 推荐人检查是一种方法,但并不可靠。

You could require a key and a hash to be passed along to your webapp in the redirect. 您可能需要在重定向中将密钥和哈希值传递到您的webapp。 The redirecting app generates the key, hashes it with a shared secret, and then passes the key and the hashed value to your webapp. 重定向应用程序会生成密钥,并使用共享密钥对其进行哈希处理,然后将密钥和哈希值传递给您的Web应用程序。 Your webapp hashes the key with the shared secret and if it's equal to the hashed value that was provided, access is allowed. 您的Web应用程序使用共享密钥对密钥进行哈希处理,如果该密钥等于所提供的哈希值,则允许访问。

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

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