We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am getting the following error when using Posthog Cloud (not self hosted):
Access to XMLHttpRequest at 'https://us-assets.i.posthog.com/array/phc_FRkS0YOcYGQuxJhYlaTKH5u6j1vbpAVqwuPpSCf3i5N/config?ip=1&_=1734571510365&ver=1.201.1' from origin 'http://localhost:3000' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
It does seem that events are getting sent, however this is showing on both local host and production in the dev console.
I am using Nuxt 3 without SSR.
`export default defineNuxtPlugin(nuxtApp => { const runtimeConfig = useRuntimeConfig(); const IS_DEV = import.meta.env.MODE === 'development' const route = useRoute();
const posthogClient = posthog.init(runtimeConfig.public.posthogPublicKey, <PostHogConfig | any>{ api_host: runtimeConfig.public.posthogHost || 'https://us.i.posthog.com', person_profiles: 'identified_only', capture_pageview: false, // we add manual pageview capturing below autocapture:false, debug: false, mask_all_text: true, capture_dead_clicks: true, disable_session_recording: IS_DEV, session_recording: { maskAllInputs: true, maskTextSelector: "*", }, before_send: (event: CaptureResult | null): CaptureResult | null => { // Do not send events if we are in dev mode if (IS_DEV) { // if (event) { // console.log('posthog event: ' + event.event, event) // } return null } else { return event } }, // loaded: (posthog) => { // // if (import.meta.env.MODE === 'development') posthog.debug(); // } })
// Make sure that pageviews are captured with each route change const router = useRouter(); router.afterEach((to) => { nextTick(() => { posthog.capture('$pageview', { current_url: to.fullPath }); }); });
return { provide: { posthog: () => posthogClient } }
return })
`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Description
Bug description
I am getting the following error when using Posthog Cloud (not self hosted):
Access to XMLHttpRequest at 'https://us-assets.i.posthog.com/array/phc_FRkS0YOcYGQuxJhYlaTKH5u6j1vbpAVqwuPpSCf3i5N/config?ip=1&_=1734571510365&ver=1.201.1' from origin 'http://localhost:3000' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
It does seem that events are getting sent, however this is showing on both local host and production in the dev console.
I am using Nuxt 3 without SSR.
Initialization code:
`export default defineNuxtPlugin(nuxtApp => {
const runtimeConfig = useRuntimeConfig();
const IS_DEV = import.meta.env.MODE === 'development'
const route = useRoute();
const posthogClient = posthog.init(runtimeConfig.public.posthogPublicKey, <PostHogConfig | any>{
api_host: runtimeConfig.public.posthogHost || 'https://us.i.posthog.com',
person_profiles: 'identified_only',
capture_pageview: false, // we add manual pageview capturing below
autocapture:false,
debug: false,
mask_all_text: true,
capture_dead_clicks: true,
disable_session_recording: IS_DEV,
session_recording: {
maskAllInputs: true,
maskTextSelector: "*",
},
before_send: (event: CaptureResult | null): CaptureResult | null => {
// Do not send events if we are in dev mode
if (IS_DEV) {
// if (event) {
// console.log('posthog event: ' + event.event, event)
// }
return null
} else {
return event
}
},
// loaded: (posthog) => {
// // if (import.meta.env.MODE === 'development') posthog.debug();
// }
})
// Make sure that pageviews are captured with each route change
const router = useRouter();
router.afterEach((to) => {
nextTick(() => {
posthog.capture('$pageview', {
current_url: to.fullPath
});
});
});
return {
provide: {
posthog: () => posthogClient
}
}
return
})
`
The text was updated successfully, but these errors were encountered: