Skip to content

Commit

Permalink
Add chatbot path to nginx server configuration
Browse files Browse the repository at this point in the history
Remove chatbot parameter
  • Loading branch information
acsmarcobrunet committed Feb 2, 2024
1 parent 4349d61 commit c85542e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
13 changes: 12 additions & 1 deletion nginx.vh.default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ server {
listen 80;
listen [::]:80;
client_max_body_size 200M;

#WebSocket reverse proxy configuration for chatbot
location /hyperiot/llm/ws {
resolver 127.0.0.1 [::1];
rewrite ^/hyperiot/llm/ws/(.*) /ws/$1 break;
proxy_http_version 1.1;
proxy_set_header Upgrade ${DOLLAR}http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass "${API_CHATBOT_URL}";
}

#WebSocket reverse proxy configuration
location /hyperiot/ws {
resolver 127.0.0.1 [::1];
Expand All @@ -17,7 +28,7 @@ server {
proxy_http_version 1.1;
proxy_pass "${API_URL}";
}

#Angular APP Configuration
location / {
root /usr/share/nginx/html;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class HytChatbotComponent implements OnInit, OnDestroy, AfterViewInit {
@ViewChild("inputMsg") inputMsgEl?: ElementRef;

/** Url for ccat defined inside src/environments/ */
@Input() public ccatUrl: string;
@Input() public ccatUrl: string = location.hostname;

/** enable ccat secure connection (ws or wss) */
@Input() public secure = false;
Expand Down
1 change: 0 additions & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

<hyt-chatbot
*ngIf="showToolBars()"
[ccatUrl]="environment.ccatUrl"
[secure]="environment.ccatSecure"
[port]="environment.ccatPort"
[urlPath]="environment.ccatPath"
Expand Down

0 comments on commit c85542e

Please sign in to comment.