Primary and secondary script DB Conflict
i'm facing a problem maybe it's quite odd. i've 2 script. primary script normal portal and 2nd script is complete api. in 2nd script i've made a middleware where I check whether the request comes from a whitelisted IP or not. now the problem is where i make an API request using CURL Or HTTP Client form primary Script then API Script run query using Primary Script DB. except his own. How to solve this .
For Example: ApI script db is : api_portal and primary script portal: primary_portal
when make api requst from postman it work properly and api script run query from ( api_portal ) DB. but where i request from primary script the api script use ( primary_portal ) DB. this is the problem. may expert undrastand.
Please or to participate in this conversation.