diff --git a/content/self-host/rustdesk-server-pro/faq/_index.en.md b/content/self-host/rustdesk-server-pro/faq/_index.en.md index f655a43..0600393 100644 --- a/content/self-host/rustdesk-server-pro/faq/_index.en.md +++ b/content/self-host/rustdesk-server-pro/faq/_index.en.md @@ -364,7 +364,7 @@ Notice: Run `sudo service nginx restart` if you change the `rustdesk.conf` manua #### 7. Login to the web page * Open `https://` in the browser, log in using the default user name "admin" and password "test1234", then change the password to your own. -### 8. Add WebSocket Secure (WSS) support for the id server and relay server to enable secure communication for the web client. +#### 8. Add WebSocket Secure (WSS) support for the id server and relay server to enable secure communication for the web client. Add the following configuration to the first `server` section of the `/etc/nginx/.../rustdesk.conf` file, then restart the `Nginx` service. @@ -443,6 +443,29 @@ server { } ``` +#### 9. Log in to your server from RustDesk public web client at `https://rustdesk.com/web`. + +You need to add below in the `location /` section of the `/etc/nginx/.../rustdesk.conf` to bypass CORS limitation of browsers. + +``` + if ($http_origin ~* (https?://(www\.)?rustdesk\.com)) { + add_header 'Access-Control-Allow-Origin' "$http_origin" always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization' always; + add_header 'Access-Control-Allow-Credentials' 'true' always; + } + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Allow-Origin' "$http_origin" always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization' always; + add_header 'Access-Control-Allow-Credentials' 'true' always; + add_header 'Content-Length' 0; + add_header 'Content-Type' 'text/plain charset=UTF-8'; + return 204; + } +``` + + ### SELinux If `Waiting for RustDesk Relay service to become active...` appears when install, it may be caused by SELinux. You can try the following commands: