Skip to content

Commit

Permalink
Merge branch 'main' into feat/skelton
Browse files Browse the repository at this point in the history
  • Loading branch information
abhayymishraa authored Jan 26, 2025
2 parents eb31b1a + 46b1939 commit a0498d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/run-ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ jobs:
echo "VITE_ALGOLIA_SEARCH_API_KEY=${{ secrets.VITE_ALGOLIA_SEARCH_API_KEY }}" >> frontend/.env.staging
echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" >> frontend/.env.staging
echo "VITE_ENVIRONMENT=${{ secrets.VITE_ENVIRONMENT }}" >> frontend/.env.staging
echo "VITE_GRAPHQL_URL=${{ secrets.VITE_GRAPHQL_URL }}" >> frontend/.env.staging
echo "VITE_RELEASE_VERSION=$(date '+%y.%-m.%-d')-${GITHUB_SHA:0:7}" >> frontend/.env.staging
echo "VITE_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> frontend/.env.staging
Expand Down Expand Up @@ -335,6 +336,7 @@ jobs:
echo "VITE_ALGOLIA_SEARCH_API_KEY=${{ secrets.ALGOLIA_SEARCH_API_KEY }}" >> frontend/.env.production
echo "VITE_API_URL=https://nest.owasp.org/api/v1" >> frontend/.env.production
echo "VITE_ENVIRONMENT=production" >> frontend/.env.production
echo "VITE_GRAPHQL_URL=${{ secrets.VITE_GRAPHQL_URL }}" >> frontend/.env.staging
echo "VITE_RELEASE_VERSION=${{ github.event.release.tag_name }}" >> frontend/.env.production
echo "VITE_SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> frontend/.env.production
Expand Down
8 changes: 4 additions & 4 deletions nginx/production.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ server {
ssl_ciphers HIGH:!aNULL:!MD5;

location / {
proxy_pass http://production-frontend:3000;
proxy_pass http://production-nest-frontend:3000;
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;
proxy_set_header X-Real-IP $remote_addr;
}

location ~ ^/(api|integrations|a)/ {
location ~ ^/(a|api|graphql|integrations)/ {
proxy_pass http://production-backend:8000;
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;
proxy_set_header X-Real-IP $remote_addr;
}
}

Expand Down
29 changes: 3 additions & 26 deletions nginx/staging.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,20 @@ server {
ssl_stapling on;
ssl_stapling_verify on;


proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;

location / {
proxy_pass http://staging-nest-frontend:3000;
}

location /a/ {
proxy_pass http://staging-nest-backend:8000;
proxy_request_buffering off;
proxy_set_header Host nest.owasp.dev;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}

location /api/ {
proxy_pass http://staging-nest-backend:8000;
proxy_request_buffering off;
proxy_set_header Host nest.owasp.dev;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}

location /integrations/slack/ {
gzip off;
location ~ ^/(a|api|graphql|integrations)/ {
proxy_pass http://staging-nest-backend:8000;
proxy_request_buffering off;
proxy_set_header Host nest.owasp.dev;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Slack-Request-Timestamp $http_x_slack_request_timestamp;
proxy_set_header X-Slack-Signature $http_x_slack_signature;
}
}

Expand Down

0 comments on commit a0498d7

Please sign in to comment.