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

Server side request is returning 403 #387

Open
FlambeSk opened this issue Jan 18, 2024 · 0 comments
Open

Server side request is returning 403 #387

FlambeSk opened this issue Jan 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@FlambeSk
Copy link

FlambeSk commented Jan 18, 2024

Version

@nuxtjs/strapi: 1.11.0
nuxt: 3.9.1

Reproduction

I am trying to fetch collection on server side. Problem is that I am still getting 403 on refresh (F5) site. Collection is allowed only for specific role. I can't make it public.
When I am switching between routes, everything works perfectly. When I check the console, Nuxt is first calling collection API and then User api.

image

Here is example how I call my API:

const { data:tournaments } = await useAsyncData("tournaments", () =>
  find<any>("tournaments", {
    populate: '*',
    filters: {
      'active': 'true'
    }
  })
);
</script>

I also tried use middleware and get user there, but user was still undefined.

@FlambeSk FlambeSk added the bug Something isn't working label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant