This commit is contained in:
jack ning
2025-08-08 09:53:20 +08:00
parent 9bf56ca8a0
commit 828fd1bc9d
9 changed files with 56 additions and 14 deletions

View File

@@ -177,7 +177,7 @@ services:
SERVER_PORT: 9003
# bytedesk config
BYTEDESK_DEBUG: "false"
BYTEDESK_VERSION: 0.9.0
BYTEDESK_VERSION: 0.9.1
# 申请licenseKey
# https://www.weiyuai.cn/docs/zh-CN/docs/faq#%E9%97%AE%E9%A2%9813%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E8%AF%95%E7%94%A8%E7%89%88license
BYTEDESK_LICENSE_KEY:

View File

@@ -157,7 +157,7 @@ services:
SERVER_PORT: 9003
# bytedesk config
BYTEDESK_DEBUG: "false"
BYTEDESK_VERSION: 0.9.0
BYTEDESK_VERSION: 0.9.1
# 申请licenseKey
# https://www.weiyuai.cn/docs/zh-CN/docs/faq#%E9%97%AE%E9%A2%9813%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E8%AF%95%E7%94%A8%E7%89%88license
BYTEDESK_LICENSE_KEY:

View File

@@ -10,7 +10,7 @@ data:
# 微语配置
BYTEDESK_DEBUG: "false"
BYTEDESK_VERSION: "0.9.0"
BYTEDESK_VERSION: "0.9.1"
BYTEDESK_LICENSE_KEY: ""
# 自定义配置

View File

@@ -123,6 +123,48 @@ server {
add_header Access-Control-Allow-Origin "https://janus.weiyuai.cn" always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin "https://janus.weiyuai.cn" always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
add_header Access-Control-Max-Age 1728000;
add_header Content-Type 'text/plain; charset=utf-8';
add_header Content-Length 0;
return 204;
}
}
# Janus Admin WebSocket API (port 7188)
location /admin-ws/ {
proxy_pass http://121.36.247.120:7188/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 86400;
proxy_send_timeout 86400;
proxy_connect_timeout 60s;
proxy_buffering off;
# CORS headers
add_header Access-Control-Allow-Origin "https://janus.weiyuai.cn" always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin "https://janus.weiyuai.cn" always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
add_header Access-Control-Max-Age 1728000;
add_header Content-Type 'text/plain; charset=utf-8';
add_header Content-Length 0;
return 204;
}
}
# Static file serving for Janus demos

View File

@@ -2,7 +2,7 @@
#=bytedesk
# ===============================
bytedesk.debug=true
bytedesk.version=0.9.0
bytedesk.version=0.9.1
# 申请实际的license
# https://www.weiyuai.cn/docs/zh-CN/docs/faq#%E9%97%AE%E9%A2%9813%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E8%AF%95%E7%94%A8%E7%89%88license
bytedesk.licenseKey=

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-01-29 16:21:24
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-08-03 19:23:26
* @LastEditTime: 2025-08-08 09:47:28
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
@@ -55,7 +55,7 @@ public class AuthController {
private PushRestService pushRestService;
private KaptchaRedisService kaptchaCacheService;
private KaptchaRedisService kaptchaRestService;
private AuthenticationManager authenticationManager;
@@ -64,7 +64,7 @@ public class AuthController {
@PostMapping(value = "/register")
public ResponseEntity<?> register(@RequestBody UserRequest userRequest, HttpServletRequest request) {
if (!kaptchaCacheService.checkKaptcha(userRequest.getCaptchaUid(), userRequest.getCaptchaCode(),
if (!kaptchaRestService.checkKaptcha(userRequest.getCaptchaUid(), userRequest.getCaptchaCode(),
userRequest.getChannel())) {
return ResponseEntity.ok().body(JsonResult.error(I18Consts.I18N_AUTH_CAPTCHA_ERROR, -1, false));
}
@@ -85,7 +85,7 @@ public class AuthController {
public ResponseEntity<?> loginWithUsernamePassword(@RequestBody AuthRequest authRequest) {
log.debug("login {}", authRequest.toString());
if (!kaptchaCacheService.checkKaptcha(authRequest.getCaptchaUid(), authRequest.getCaptchaCode(),
if (!kaptchaRestService.checkKaptcha(authRequest.getCaptchaUid(), authRequest.getCaptchaCode(),
authRequest.getChannel())) {
return ResponseEntity.ok().body(JsonResult.error(I18Consts.I18N_AUTH_CAPTCHA_ERROR, -1, false));
}
@@ -118,7 +118,7 @@ public class AuthController {
log.debug("send mobile code {}, client {}, type {}", authRequest.toString(), authRequest.getChannel(),
authRequest.getType());
if (!kaptchaCacheService.checkKaptcha(authRequest.getCaptchaUid(), authRequest.getCaptchaCode(),
if (!kaptchaRestService.checkKaptcha(authRequest.getCaptchaUid(), authRequest.getCaptchaCode(),
authRequest.getChannel())) {
return ResponseEntity.ok().body(JsonResult.error(I18Consts.I18N_AUTH_CAPTCHA_ERROR, -1, false));
}
@@ -137,7 +137,7 @@ public class AuthController {
public ResponseEntity<?> loginWithMobileCode(@RequestBody AuthRequest authRequest, HttpServletRequest request) {
log.debug("login mobile {}", authRequest.toString());
if (!kaptchaCacheService.checkKaptcha(authRequest.getCaptchaUid(), authRequest.getCaptchaCode(),
if (!kaptchaRestService.checkKaptcha(authRequest.getCaptchaUid(), authRequest.getCaptchaCode(),
authRequest.getChannel())) {
return ResponseEntity.ok().body(JsonResult.error(I18Consts.I18N_AUTH_CAPTCHA_ERROR, -1, false));
}
@@ -186,7 +186,7 @@ public class AuthController {
public ResponseEntity<?> sendEmailCode(@RequestBody AuthRequest authRequest, HttpServletRequest request) {
log.debug("send email code {}", authRequest.toString());
if (!kaptchaCacheService.checkKaptcha(authRequest.getCaptchaUid(), authRequest.getCaptchaCode(),
if (!kaptchaRestService.checkKaptcha(authRequest.getCaptchaUid(), authRequest.getCaptchaCode(),
authRequest.getChannel())) {
return ResponseEntity.ok().body(JsonResult.error(I18Consts.I18N_AUTH_CAPTCHA_ERROR, -1, false));
}

View File

@@ -44,7 +44,7 @@
<springdoc.version>2.8.8</springdoc.version>
<spring-ai.version>1.0.0</spring-ai.version>
<spring-ai-alibaba.version>1.0.0.3-SNAPSHOT</spring-ai-alibaba.version>
<revision>0.9.0</revision>
<revision>0.9.1</revision>
</properties>
<dependencies>

View File

@@ -2,7 +2,7 @@
#=bytedesk
# ===============================
bytedesk.debug=true
bytedesk.version=0.9.0
bytedesk.version=0.9.1
# 申请实际的license
# https://www.weiyuai.cn/docs/zh-CN/docs/faq#%E9%97%AE%E9%A2%9813%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E8%AF%95%E7%94%A8%E7%89%88license
bytedesk.licenseKey=

View File

@@ -5,7 +5,7 @@
# ===============================
spring.application.name=bytedesk
application.title=https://www.weiyuai.cn
application.version=0.9.0
application.version=0.9.1
server.port=9003
# ===============================