Skip to content

Commit

Permalink
Fixed CORS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ozziest committed Nov 14, 2024
1 parent 3405498 commit f86122b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@ on:
- "main"

jobs:
# dockerize:
# name: production-api
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: api
# steps:
# - uses: actions/checkout@v3
# - name: Use Node.js 20.x
# uses: actions/setup-node@v3
# with:
# node-version: 20.x
# - name: Install doctl
# uses: digitalocean/action-doctl@v2
# with:
# token: ${{ secrets.REGISTERY_ACCESS_TOKEN }}
# - name: Dependencies
# run: npm ci
# - name: Build
# run: npm run build
# - name: Build the image
# run: |
# cd build
# docker build -t api .
# docker tag api:latest registry.digitalocean.com/tinyblog/api:latest
# doctl registry login --expiry-seconds 600
# docker push registry.digitalocean.com/tinyblog/api:latest
# doctl registry garbage-collection start tinyblog --force
dockerize:
name: production-api
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.REGISTERY_ACCESS_TOKEN }}
- name: Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Build the image
run: |
cd build
docker build -t api .
docker tag api:latest registry.digitalocean.com/tinyblog/api:latest
doctl registry login --expiry-seconds 600
docker push registry.digitalocean.com/tinyblog/api:latest
doctl registry garbage-collection start tinyblog --force
build:
name: production-app
Expand Down
1 change: 1 addition & 0 deletions api/app/v1/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const CORS_WHITE_LIST = [
"http://localhost:5173",
"http://localhost:3005",
"https://staging.tinyblog.space",
"https://tinyblog.space",
];

const onBeforeInit = async (app: App) => {
Expand Down

0 comments on commit f86122b

Please sign in to comment.