-
Notifications
You must be signed in to change notification settings - Fork 259
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
add applicationPassword & some rest-api compatiable with wordpress rest-api #351
Conversation
有几处Linter 错误 :) |
} | ||
|
||
func verifyHeader(header string) bool { | ||
compile, err := regexp.Compile("^Basic [a-z\\d/+]*={0,2}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里可以把regexp对象定义成一个全局变量,不需要每次Compile,性能更好
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
其实我觉得这个功能更适合用插件去实现,不过目前确实还不支持插件:( |
也没必要一定要用插件实现,wordpress已经将类似功能从插件移植到自身了 |
本质上这个接口是对wp的适配,所以我认为不应该放到sonic中。 |
其实这个应该拆成两部分,一部分是sonic自身的rest-api,这部分可以放到sonic自身,提高整体的可玩性。第二部分是针对wp接口的兼容,这个放插件更合适一点,我还是保留我的意见。 |
Post
Tag
Category
User