Compare commits

..
8 Commits
Author SHA1 Message Date
Chris Troutner 2568818ea1 Merge pull request #62 from Permissionless-Software-Foundation/ct-unstable
fix(CORS): Adding OPTIONS as an allowed method
2025-01-12 17:03:02 -07:00
Chris Troutner 4564090830 fix(CORS): Adding OPTIONS as an allowed method 2024-10-01 08:17:17 -07:00
Chris Troutner 512a49200d Merge pull request #61 from Permissionless-Software-Foundation/ct-unstable
Syncing with upstream ipfs-service-provider
2024-09-13 10:12:32 -07:00
Chris Troutner c6019df364 Merge remote-tracking branch 'upstream/master' into ct-unstable 2024-09-13 10:11:21 -07:00
Chris Troutner b7988253df Adding system-user-dev.json to gitignore 2024-09-13 10:11:08 -07:00
Chris Troutner 5f64257dca Merge pull request #162 from Permissionless-Software-Foundation/ct-unstable
fix(webrtc): Disabling webRTC due to bug
2024-09-13 10:07:53 -07:00
Chris Troutner 2fbdccb883 fix(webrtc): Disabling webRTC due to bug 2024-09-13 10:06:19 -07:00
Chris Troutner ecc10afac3 linting 2024-09-13 10:05:05 -07:00
4 changed files with 16 additions and 12 deletions
+1
View File
@@ -73,3 +73,4 @@ run-dev.sh
!README.md
wallet.json
system-user-dev.json
+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": "B0UfkpmxNEDo0ubFUiRm",
"password": "TRJkYBg4qDNLZfG5PJO6",
"email": "system@system.com",
"id": "66e0e253779ed8f96f37a21e",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2ZTBlMjUzNzc5ZWQ4Zjk2ZjM3YTIxZSIsImlhdCI6MTcyNjAxNDAzNX0.Y6x9E9CK21XOTCBzvPSSgGSdQu19ppbFVRtMMb4bJtQ"
"id": "66e48033071977ff258c24ce",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2ZTQ4MDMzMDcxOTc3ZmYyNThjMjRjZSIsImlhdCI6MTcyNjI1MTA1OX0.RLjnUWy6NziVem0ciFcjfaQz_lplnNfxAZUEceygTf8"
}
+8 -8
View File
@@ -21,12 +21,12 @@ import { yamux } from '@chainsafe/libp2p-yamux'
// import { identifyService } from 'libp2p/identify'
import { identify } from '@libp2p/identify'
// import { circuitRelayServer, circuitRelayTransport } from 'libp2p/circuit-relay'
import { circuitRelayServer, circuitRelayTransport } from '@libp2p/circuit-relay-v2'
import { circuitRelayServer } from '@libp2p/circuit-relay-v2'
import { gossipsub } from '@chainsafe/libp2p-gossipsub'
import { webSockets } from '@libp2p/websockets'
import { publicIpv4 } from 'public-ip'
import { multiaddr } from '@multiformats/multiaddr'
import { webRTC } from '@libp2p/webrtc'
// import { webRTC } from '@libp2p/webrtc'
import { keychain } from '@libp2p/keychain'
import { defaultLogger } from '@libp2p/logger'
import { unixfs } from '@helia/unixfs'
@@ -177,12 +177,12 @@ class IpfsAdapter {
const transports = [
tcp(),
webSockets(),
circuitRelayTransport({
discoverRelays: 3,
reservationConcurrency: 3
}),
webRTC()
webSockets()
// circuitRelayTransport({
// discoverRelays: 3,
// reservationConcurrency: 3
// }),
// webRTC()
]
// libp2p is the networking layer that underpins Helia