Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to protect api route? #13

Open
apsbd opened this issue Sep 14, 2022 · 1 comment
Open

How to protect api route? #13

apsbd opened this issue Sep 14, 2022 · 1 comment

Comments

@apsbd
Copy link

apsbd commented Sep 14, 2022

I'm using this to search my users and return the value with id and email in pair.

AjaxField::make('Foo')->setUrl('/api/ajaxselect/users?search=Jon')

My questions is how to secure the api route? I used 'nova' middleware in my routes/api.php file. but it's not working.

Any help will be appreciated.

Thanks,
Ahmed

@alies-dev
Copy link

@apsbd
You can use some secret as a part of URL/query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants