我在 ballerinalang 中实现了一个名为https://localhost:9090/isValidUser
. 下面是我的代码
import ballerina.net.http;
@http:configuration {
basePath:"/",
httpsPort:9090,
keyStoreFile:"${ballerina.home}/bre/security/wso2carbon.jks",
keyStorePassword:"wso2carbon",
certPassword:"wso2carbon",
trustStoreFile:"${ballerina.home}/bre/security/client-truststore.jks",
trustStorePassword:"wso2carbon"
}
service<http> authentication {
@http:resourceConfig {
methods:["POST"],
path:"/isValidUser"
}
resource isValidUser (http:Request req, http:Response res) {
println(req.getHeaders());
res.send();
}
}
现在我需要做的是,当我从浏览器调用该 URL 时,我需要将用户重定向到另一个https://localhost:3000
在我的服务中发生一些验证后调用的 URL。
那么我怎样才能从芭蕾舞演员中进行这种重定向呢?