Skip to content

Commit

Permalink
fix: cors
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Aug 18, 2024
1 parent 6cddb82 commit 4234696
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the
You can get the ALBYHUB_URL, AUTH_TOKEN and ALBYHUB_NAME by logging into Alby Hub and Going to settings -> Developer.

> Optionally set `NAME`, `DESCRIPTION` and `IMAGE` if you'd like to list your Jim instance on [Jim Index](https://getalby.github.io/jim-index/)
### Updating

1. Run `fly deploy`
Expand Down
20 changes: 19 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
headers: async () => {
return [
{
source: "/api/:path*",
headers: [
{
key: "Access-Control-Allow-Origin",
value: "*",
},
{
key: "Access-Control-Allow-Methods",
value: "GET, POST, PUT, DELETE, OPTIONS",
},
],
},
];
},
};

export default nextConfig;

0 comments on commit 4234696

Please sign in to comment.