Fermé

subdomain setup react -- 2

Job Description:

im creating mern app which requires dynamic unlimited subdomains like [login to view URL] for this if write any thing before localhost it gives me error invalid host header.

To achieve this, I have added the line

DANGEROUSLY_DISABLE_HOST_CHECK=true

in my .env file. which is not a good idea.

When a user logs in at localhost:3000, cookies are created and the user is authenticated. If the user is registered with a specific company, they should be redirected to [login to view URL] while remaining logged in. However, upon redirecting to the subdomain, all cookies that were created on localhost are lost and the user is redirected to the login page again. I expected the cookies to persist on the subdomain and enable the user to remain logged in. Can someone please assist me with this issue?

Compétences : React.js, MERN Stack, Node.js, Express JS

Concernant le client :
( 0 commentaires ) Faisalabad, Pakistan

Nº du projet : #36274284

7 freelances font une offre moyenne de 152 $ pour ce travail

john1101

The reason why the cookies are lost upon redirecting to the subdomain is because cookies are domain-specific, meaning they are only accessible on the domain and its subdomains that created them. Since your app is runni Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 2 jours
(0 Commentaires)
0.0
softtrain

Hi Greetings! We are team of software developers. We have big team of around 1500 software developers all over the world associated with us. We have developers working on almost all the technologies. We will assign yo Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(0 Commentaires)
0.0
pannnov

hello Thank for your job posting I just read your job description and I think it's a great fit for your project. Please look forward to the best beautiful results. I've done similar things in the past With my rich expe Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(0 Commentaires)
0.0
ronicksamuel

Hello, I have encountered similar problems on past projects and I'm happy to work with you on this one. To solve this issue, we need to modify the domain and path of the cookie so that it can be accessed by pages on t Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(0 Commentaires)
0.0
nikkisingh1311

Hii there. I have worked on mern as my full time opportunities. As i am the professional one. I will complete your task in your budgets and on time. Trust me and moves one step . You will feel so excited. Thank you.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(0 Commentaires)
0.0
softroad

Hi Greetings! I am available right now for the project discussion and can start the project on an immediate basis. I have understood your project requirement I have7++ experience in design and development. I can ha Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(0 Commentaires)
0.0