Reputation:
In the react project, there are two index files; let's say index1.html and index2.html I have to redirect the request coming to index1 from another website to index2 and set some global variable if the website request came to index1. I totally have no idea how to solve this I don't have permission to change back-end code.
Upvotes: 0
Views: 82
Reputation: 1538
You can set a cookie on the front end too. See react-cookie. And you get the referrer from document.referrer.
Of course, usual caveats with cookies and referrers apply:
Upvotes: 1