shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

When the Sign Plugin is used, the contextPath of ShenyuContext is empty, causing the appParam parameter to fail to be appended.

Open ttfont opened this issue 2 years ago • 3 comments

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. [:](sign) The appParam parameter cannot be appended to the header. sign3

("/" + p.getAppName()).equals(contextPath) = false

sign4

ttfont avatar Dec 18 '23 10:12 ttfont

must config context -path ,pls used english

yu199195 avatar Dec 19 '23 02:12 yu199195

Where is context-path configured?

c1 or c2

ttfont avatar Dec 19 '23 02:12 ttfont

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); }

c3

@yu199195

ttfont avatar Dec 19 '23 02:12 ttfont