register
This commit is contained in:
parent
59dabaa591
commit
0e20a01a5b
5 changed files with 107 additions and 132 deletions
|
|
@ -5,8 +5,16 @@ server {
|
|||
|
||||
ssl_certificate /etc/letsencrypt/live/spectralvpn.ru/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/spectralvpn.ru/privkey.pem;
|
||||
|
||||
|
||||
location / {
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header 'Access-Control-Allow-Origin' 'https://spectralvpn.ru';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||
add_header 'Access-Control-Allow-Headers' 'Content-Type';
|
||||
add_header 'Access-Control-Max-Age' 86400;
|
||||
return 204;
|
||||
}
|
||||
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
|
@ -14,5 +22,7 @@ server {
|
|||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
|
||||
add_header Access-Control-Allow-Origin "https://spectralvpn.ru" always;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue