1

I'm attempting to utilize the session management capabilities of ArangoDB Foxx, but I'm struggling a bit to understand the workflow.

I've created some API's in Foxx and I want those API's to be called by the client. However, I understand that in order for the API to be secured I need to have the client relay requests through my server to the service. (So I can keep my secret API Key safe)

NodeJS is hosting my website and I would like it to proxy my requests from the client to Foxx. I'm thinking that the client makes the request to Node, In turn NodeJS hashes the request with the API Key, then forwards the request to Foxx where auth is handled. Then Foxx would send the auth cookie back through NodeJS to the client.

Am I imagining this correctly? If so, what function in Node (or Express) would allow me to intercept the request and hash it with the API key? And how would the cookie get sent back through Node to the client?

Thanks!

skinneejoe
  • 3,921
  • 5
  • 30
  • 45

0 Answers0