domain allowlist
kensyone
HOBBYOP

a year ago

I’d like to know if there’s a way to configure a domain allowlist or restriction so that only requests from specific domains are allowed to access my app over HTTP

Solved$10 Bounty

Pinned Solution

janup2442
FREE

a year ago

If you are using Nodejs server for your app , you can use CORS library (npm i cors). its Cross Origin Resource Sharing middleware , which only allow whitelisted domain to access and use you api or app .

configure it in , according your need . for e.g.

import cors from 'cors'

app.use(cors({

origin : ['array of allowed origin'],

credentials: true // true if you are using cookies in your site , by default its false

}))

1 Replies

a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 11 months ago


janup2442
FREE

a year ago

If you are using Nodejs server for your app , you can use CORS library (npm i cors). its Cross Origin Resource Sharing middleware , which only allow whitelisted domain to access and use you api or app .

configure it in , according your need . for e.g.

import cors from 'cors'

app.use(cors({

origin : ['array of allowed origin'],

credentials: true // true if you are using cookies in your site , by default its false

}))


Status changed to Solved brody 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...