When the Sign Plugin is used, the contextPath of ShenyuContext is empty, causing the appParam parameter to fail to be appended.
Question
shenyu version 2.6.0
When the Sign Plugin is used, the contextPath of ShenyuContext is empty, causing the appParam parameter to fail to be appended.
[:]()
The appParam parameter cannot be appended to the header.
("/" + p.getAppName()).equals(contextPath) = false
must config context -path ,pls used english
Where is context-path configured?
or
must config context -path ,pls used english
I modified the signatureVerify method in the ComposableSignService class. Added code before handling handleExchange to get the contextPath value of shenyuContext.getPath() when contextPath is empty。
if (result.isSuccess()) { String contextPath = shenyuContext.getContextPath(); if (StringUtils.isBlank(contextPath)) { contextPath = "/" + StringUtils.split(shenyuContext.getPath(), "/")[0]; } handleExchange(exchange, appAuthData, contextPath); }
@yu199195