Sinnbeck3 years agoLevel 102ReplyReport SpamI assume you mean frontend using vue or similar? You could add a secret token to all requests. Like Reply 1 like
uniqueginun OP 3 years agoLevel 9ReplyReport Spam@Sinnbeck no consume it internally via AJAX requests from within the same app Like Reply
rodrigo.pedra3 years agoLevel 56ReplyReport Spam@uniqueginun use a session cookie? Just as sanctum does for local app? HTTP cookies are set for the same domain, and you can tell axios, fetch or XMLHttpRequest to send them on every request. Requests from your app will have the session cookie. Requests from 3rd-party won't. This is exactly how sanctum works, but if you can't use it for any reason, you can at least use its code base to guide you on how to it. Like Reply 1 like