Skip to content

Commit 0e1988c

Browse files
Shahriyar MammadovShahriyar Mammadov
authored andcommitted
uo
1 parent cecce57 commit 0e1988c

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

apps/mentormap/scripts/nginx-mentormap.conf

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ server {
3333

3434
# HTTPS - Frontend (mentormap.ai)
3535
server {
36-
listen 443 ssl http2;
36+
listen 443 ssl;
37+
http2 on;
3738
server_name mentormap.ai www.mentormap.ai;
3839

3940
# SSL Configuration (will be added by certbot)
@@ -89,7 +90,8 @@ server {
8990

9091
# HTTPS - Backend API (api.mentormap.ai)
9192
server {
92-
listen 443 ssl http2;
93+
listen 443 ssl;
94+
http2 on;
9395
server_name api.mentormap.ai;
9496

9597
# SSL Configuration (will be added by certbot)
@@ -111,15 +113,16 @@ server {
111113
add_header Access-Control-Allow-Credentials "true" always;
112114

113115
# Handle preflight requests
114-
if ($request_method = 'OPTIONS') {
115-
add_header Access-Control-Allow-Origin "https://mentormap.ai" always;
116-
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
117-
add_header Access-Control-Allow-Headers "Authorization, Content-Type" always;
118-
add_header Access-Control-Allow-Credentials "true" always;
119-
add_header Content-Length 0;
120-
add_header Content-Type text/plain;
121-
return 204;
122-
}
116+
location / {
117+
if ($request_method = 'OPTIONS') {
118+
add_header Access-Control-Allow-Origin "https://mentormap.ai" always;
119+
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
120+
add_header Access-Control-Allow-Headers "Authorization, Content-Type" always;
121+
add_header Access-Control-Allow-Credentials "true" always;
122+
add_header Content-Length 0;
123+
add_header Content-Type text/plain;
124+
return 204;
125+
}
123126

124127
# Backend API proxy
125128
location / {

0 commit comments

Comments
 (0)