Skip to content

Commit

Permalink
[FIX] backend cors and fonticons service ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
monoald committed May 21, 2024
1 parent 5c81090 commit 274f9de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-service-fonticons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
workflow_id: "ci-service-fonticons.yml"
workflow_id: 99079597
access_token: ${{ github.token }}

Deploy:
runs-on: ubuntu-lates
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 5 additions & 3 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import { cors } from "hono/cors";

const app = new Hono().basePath("api/v1");

app.use("/*", cors());
app.use("/*", async (c, next) => {
const handler = cors({
origin: [c.env?.CLIENT_URI as string, "http://localhost:3001"],
});

app.get("/", (c) => {
return c.text("it works");
return await handler(c, next);
});

app.route("/auth", auth);
Expand Down

0 comments on commit 274f9de

Please sign in to comment.