Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WEB UI の websocket uri を変わりたい #381

Open
op8867555 opened this issue Feb 15, 2021 · 1 comment
Open

WEB UI の websocket uri を変わりたい #381

op8867555 opened this issue Feb 15, 2021 · 1 comment

Comments

@op8867555
Copy link

op8867555 commented Feb 15, 2021

nginx を使って、ポート1個だけで narou にアクセスしたいですが、

server {
  listen 80;
 
  location / {
    proxy_pass http://novel:33000;
  }
 
  location /ws {
    proxy_pass http://novel:33001;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    proxy_read_timeout 86400;
  }
 
}

今の web UI の websocket uri はハードコーディングされている:

return "ws://" + host + ":" + (parseInt(port) + 1) + "/";

何らかの方法で uri を ws://<NAROU_HOST>/ws に変わりたいです。

追記: wss://に設定したら SSL ターミネーションも対応できると思います

(外国人です、変な日本語を使ったら許して下さい)

op8867555 added a commit to op8867555/narou that referenced this issue Mar 5, 2021
PoC of whiteleaf7#381

* use websocket uri saved in local storage
* add a menu entry to set its value
* default value determined by port/protocol
@op8867555
Copy link
Author

PoC (op8867555@3ccb76b) と Docker image を作りました。気軽に試してみて下さい。

op8867555 added a commit to op8867555/narou that referenced this issue Feb 5, 2024
PoC of whiteleaf7#381

* use websocket uri saved in local storage
* add a menu entry to set its value
* default value determined by port/protocol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant