-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileServer提供RPC接口还是RESTful API接口? #2052
Comments
Why we need a FileServer? If the intention was to support file upload and download, there has been one defined in Go's standard package: https://golang.org/pkg/net/http/#FileServer |
@gongweibao 用HTTP或者goRPC,我理解它们都是一种RPC,没有什么特别倾向,感觉那个简单选哪个就好。 更重要的问题可能是如何做双向的TLS验证。一般的服务器不需要验证用户的身份,只要用户相信服务器的身份就好了。这里我们需要验证用户的身份,并且从用户证书里面的账户信息提取用户名。 双向用户认证可以参考:http://www.levigross.com/2015/11/21/mutual-tls-authentication-in-go/ |
I recommend this repo: https://github.com/divio/django-filer. https://golang.org/pkg/net/http/#FileServer seems only do file downloads. |
|
@helinwang
And another way: |
我和 @Yancey1989 @typhoonzero 线下讨论了一下,准备采用RESTful API。以下是讨论部分:
对应的PR在这里,我把这个话题单独拿出来讨论一下
The text was updated successfully, but these errors were encountered: