-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
executable file
·72 lines (56 loc) · 1.68 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
events {
}
http {
map $http_upgrade $connection_upgrade{
default upgrade;
'' close;
}
# Define a localserver listening on 80 port
server {
# Define the port where the local server listens
listen 80;
# Requete pour load toutes les cards que l'utilisateur peut acheter dans le shop
location /cards_to_sell {
proxy_pass http://localhost:8083/cards_to_sell;
}
location /cards {
proxy_pass http://localhost:8083/cards;
}
# Requete pour ajouter une carte, pas sûre qu'il faut laisser ça ici?
location /card {
proxy_pass http://localhost:8083/card;
}
# Requete pour ajouter un utilisateur à la base de données (signup)
location /user {
proxy_pass http://localhost:8083/user;
}
# Requete pour accèder à tous les utilisateurs
location /users {
proxy_pass http://localhost:8083/users;
}
# Requete pour authentifier un utilisateur
location /auth {
proxy_pass http://localhost:8083/auth;
}
# Requete pour acheter une carte
location /buy {
proxy_pass http://localhost:8083/store/buy;
}
# Requete pour vendre une carte
location /sell {
proxy_pass http://localhost:8083/store/sell;
}
location /socket.io/ {
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8084;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
# Here all requests to / are redirected http://localhost:5173;
location / {
proxy_pass http://localhost:5173;
}
}
}