简体   繁体   English

如何保护 Django Rest API

[英]How to secure Django Rest API

I created custom survey with React and I want to send data once survey is complete to Drip (user managing platform) https://developer.drip.com/我使用 React 创建了自定义调查,并且我想在调查完成后将数据发送到 Drip(用户管理平台) https://developer.drip.com/

I can't connect website with Drip API directly - it'll expose API Key.我无法直接使用 Drip API 连接网站 - 它会暴露 API 密钥。 I decided to use Python Django with REST as proxy.我决定使用 Python Django 和 REST 作为代理。 My question - what's possible threats and how can I secure my Backend?我的问题 - 什么是可能的威胁以及如何保护我的后端?

Thanks!谢谢!

As per drip documentation - you could use:根据滴灌文档 - 您可以使用:

OAuth 2 authentication (for public integrations) OAuth 2 身份验证(用于公共集成)

this won't expose your API Key这不会暴露您的 API 密钥

There are a lot of materials on Google, how to do OAuth2 with React. Google上有很多资料,如何用React做OAuth2。

If you prefer to go with the proxy through Django with REST - thenhere you can find some informations如果您更喜欢 go 与代理通过 Django 与 REST - 那么在这里你可以找到一些信息

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

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