From 52083c1ff575439b52769f941257cef69242e7b1 Mon Sep 17 00:00:00 2001 From: yanxunxiaoyugan <88016320+yanxunxiaoyugan@users.noreply.github.com> Date: Tue, 23 May 2023 22:41:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(cors):=20=E8=A7=A3=E5=86=B3put=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E8=B7=A8=E5=9F=9F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dbhub/server/start/config/interceptor/CorsFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ali-dbhub-server/ali-dbhub-server-start/src/main/java/com/alibaba/dbhub/server/start/config/interceptor/CorsFilter.java b/ali-dbhub-server/ali-dbhub-server-start/src/main/java/com/alibaba/dbhub/server/start/config/interceptor/CorsFilter.java index cc0607d23..b1312a515 100644 --- a/ali-dbhub-server/ali-dbhub-server-start/src/main/java/com/alibaba/dbhub/server/start/config/interceptor/CorsFilter.java +++ b/ali-dbhub-server/ali-dbhub-server-start/src/main/java/com/alibaba/dbhub/server/start/config/interceptor/CorsFilter.java @@ -32,7 +32,7 @@ public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) response.setHeader("Access-Control-Allow-Origin", request.getHeader(HttpHeaders.ORIGIN)); response.setHeader("Access-Control-Allow-Credentials", "true"); - response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); + response.setHeader("Access-Control-Allow-Methods", "POST, PUT, GET, OPTIONS, DELETE"); response.setHeader("Access-Control-Max-Age", "3600"); response.setHeader("Access-Control-Allow-Headers", "Content-Type, DBHUB, uid"); chain.doFilter(req, res); From 99f769594bb221562cb04bc21572aff00dc8402e Mon Sep 17 00:00:00 2001 From: yanxunxiaoyugan <88016320+yanxunxiaoyugan@users.noreply.github.com> Date: Tue, 23 May 2023 23:14:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(datasource):=E8=A7=A3=E5=86=B3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=95=B0=E6=8D=AE=E6=BA=90=E9=85=8D=E7=BD=AE=E5=90=8E?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5=E4=B8=8D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dbhub/server/web/api/aspect/ConnectionInfoHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ali-dbhub-server/ali-dbhub-server-web/ali-dbhub-server-web-api/src/main/java/com/alibaba/dbhub/server/web/api/aspect/ConnectionInfoHandler.java b/ali-dbhub-server/ali-dbhub-server-web/ali-dbhub-server-web-api/src/main/java/com/alibaba/dbhub/server/web/api/aspect/ConnectionInfoHandler.java index f71c3725c..0e35a42c1 100644 --- a/ali-dbhub-server/ali-dbhub-server-web/ali-dbhub-server-web-api/src/main/java/com/alibaba/dbhub/server/web/api/aspect/ConnectionInfoHandler.java +++ b/ali-dbhub-server/ali-dbhub-server-web/ali-dbhub-server-web-api/src/main/java/com/alibaba/dbhub/server/web/api/aspect/ConnectionInfoHandler.java @@ -83,10 +83,11 @@ public ConnectInfo toInfo(Long dataSourceId, String database, Long consoleId) { connectInfo.setUrl(dataSource.getUrl()); connectInfo.setPort(dataSource.getPort() != null ? Integer.parseInt(dataSource.getPort()) : null); connectInfo.setHost(dataSource.getHost()); + connectInfo.setGmtModified(dataSource.getGmtModified()); return connectInfo; } public ConnectInfo toInfo(Long dataSourceId, String database) { return toInfo(dataSourceId, database, null); } -} \ No newline at end of file +}