MM-12855 Plugin Context (#9922)
* Basic plugin context. * Adding more useful fields to plugin context. * Fix spelling Co-Authored-By: crspeller <crspeller@gmail.com> * Fixing location of context creation.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
de5440d979
Коммит
aba194188f
@@ -42,7 +42,12 @@ func (a *App) ServePluginRequest(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func (a *App) servePluginRequest(w http.ResponseWriter, r *http.Request, handler func(*plugin.Context, http.ResponseWriter, *http.Request)) {
|
||||
token := ""
|
||||
context := &plugin.Context{}
|
||||
context := &plugin.Context{
|
||||
RequestId: model.NewId(),
|
||||
IpAddress: utils.GetIpAddress(r),
|
||||
AcceptLanguage: r.Header.Get("Accept-Language"),
|
||||
UserAgent: r.UserAgent(),
|
||||
}
|
||||
cookieAuth := false
|
||||
|
||||
authHeader := r.Header.Get(model.HEADER_AUTH)
|
||||
|
||||
Ссылка в новой задаче
Block a user