Merge pull request #62 from Permissionless-Software-Foundation/ct-unstable

fix(CORS): Adding OPTIONS as an allowed method
This commit is contained in:
Chris Troutner
2025-01-12 17:03:02 -07:00
committed by GitHub
2 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -83,7 +83,10 @@ class Server {
// Enable CORS for testing
// THIS IS A SECURITY RISK. COMMENT OUT FOR PRODUCTION
// Dev Note: This line must come BEFORE controllers.attachRESTControllers()
app.use(cors({ origin: '*' }))
app.use(cors({
origin: '*',
allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS'
}))
// Wait for any adapters to initialize.
await this.controllers.initAdapters()
+3 -3
View File
@@ -1,6 +1,6 @@
{
"password": "bDZWE3vEO7Ufvil2s8Ko",
"password": "TRJkYBg4qDNLZfG5PJO6",
"email": "system@system.com",
"id": "66e38befd548c285159a7084",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2ZTM4YmVmZDU0OGMyODUxNTlhNzA4NCIsImlhdCI6MTcyNjE4ODUyN30.h31T7o2Si1ZOTgCf91IC4KNdkmaCqs5FNWEXysdnYTg"
"id": "66e48033071977ff258c24ce",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2ZTQ4MDMzMDcxOTc3ZmYyNThjMjRjZSIsImlhdCI6MTcyNjI1MTA1OX0.RLjnUWy6NziVem0ciFcjfaQz_lplnNfxAZUEceygTf8"
}