-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #357 from vaskocuturilo/dv000297_add_nginx_config
DV-000297: Add Nginx config.
- Loading branch information
Showing
3 changed files
with
82 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
const { defineConfig } = require("cypress"); | ||
const allureWriter = require('@shelex/cypress-allure-plugin/writer'); | ||
const {defineConfig} = require("cypress"); | ||
|
||
module.exports = defineConfig({ | ||
|
||
viewportHeight: 1080, | ||
viewportWidth: 1920, | ||
"video": false, | ||
"retries": { | ||
"runMode": 2, | ||
"openMode": 0 | ||
}, | ||
viewportHeight: 1080, | ||
viewportWidth: 1920, | ||
"video": false, | ||
"retries": { | ||
"runMode": 2, | ||
"openMode": 0 | ||
}, | ||
|
||
e2e: { | ||
setupNodeEvents(on, config) { | ||
if (config.env.master) { | ||
return { | ||
baseUrl: "http://regions-service.us-east-2.elasticbeanstalk.com/", | ||
env: { | ||
env: "master" | ||
}, | ||
}; | ||
} else | ||
return { | ||
baseUrl: "http://localhost:8080", | ||
env: { | ||
env: "qa" | ||
}, | ||
}; | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
if (config.env.master) { | ||
return { | ||
baseUrl: "http://regions-service.us-east-2.elasticbeanstalk.com/", | ||
env: { | ||
env: "master" | ||
}, | ||
}; | ||
} else | ||
return { | ||
baseUrl: "http://localhost", | ||
env: { | ||
env: "qa" | ||
}, | ||
}; | ||
}, | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
worker_processes auto; | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
# Rate limiting to prevent brute force attacks | ||
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
# Rate limiting | ||
limit_req zone=one burst=20 nodelay; | ||
limit_req_status 429; | ||
|
||
location / { | ||
proxy_pass http://server-regions:8080; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
location /backend { | ||
proxy_pass http://server-regions:8090; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} | ||
} |