Skip to content

Commit 53bf1f1

Browse files
committed
https stuff
1 parent 8aa38cf commit 53bf1f1

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

nginx-reverse.conf

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ worker_processes 1;
22

33
events { worker_connections 1024; }
44

5-
http {
6-
include mime.types;
7-
default_type application/octet-stream;
8-
sendfile on;
9-
keepalive_timeout 65;
10-
11-
server {
5+
server {
126
listen 80;
13-
server_name _;
7+
server_name rocket-app.social www.rocket-app.social;
8+
return 301 https://$host$request_uri/;
9+
}
10+
11+
server {
12+
listen 443 ssl;
13+
server_name rocket-app.social www.rocket-app.social;
14+
15+
ssl_certificate /etc/letsencrypt/live/rocket-app.social/fullchain.pem;
16+
ssl_certificate_key /etc/letsencrypt/live/rocket-app.social/privkey.pem;
1417

1518
# Forward API requests to backend (with WebSocket support)
1619
location /api/v1/ {
@@ -42,4 +45,4 @@ http {
4245
proxy_set_header X-Forwarded-Proto $scheme;
4346
}
4447
}
45-
}
48+
}

prod.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ services:
6868
image: nginx:1.27-alpine
6969
volumes:
7070
- ./nginx-reverse.conf:/etc/nginx/nginx.conf:ro
71-
# - ./certs:/etc/nginx/certs:ro
71+
- ./lets-encrypt:/etc/letsencrypt:ro
7272
ports:
73-
# - "443:443"
74-
- "8088:80"
73+
- "443:443"
74+
# - "8088:80"
7575
depends_on:
7676
- frontend
7777
- backend

rocket-backend/internal/server/public_handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (s *Server) LoginHandler(c *gin.Context) {
5252
return
5353
}
5454

55-
c.SetCookie("jwt_token", tokenString, 3600*72, "/", "", false, true)
55+
c.SetCookie("jwt_token", tokenString, 3600*72, "/", "", true, true)
5656
c.JSON(http.StatusOK, gin.H{"token": tokenString})
5757
}
5858

0 commit comments

Comments
 (0)