mevdschee / php-crud-api

Single file PHP script that adds a REST API to a SQL database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: How to use dbAuth with different hosts for frontend and backend

scriptPilot opened this issue · comments

Hey, in development the frontend is running on a different port as the backend.
dbAuth seems not to work, probably due to missing cookies.

Does anybody have an idea how to solve this issue?

I was able to solve this issue by adding credentials: 'include' to the fetch(...) request in JavaScript :-)