T3 & Plausible proxy setup

I am having a some issues configuring plausible as a proxy on my t3-project running on Vercel. Since I am using NextJS & Vercel I want to use next-plausible and I am following the example on their gh-page. https://github.com/4lejandrito/next-plausible#proxy-the-analytics-script My next.config.mjs looks like this
import { withPlausibleProxy } from "next-plausible";

function defineNextConfig(config) {
return withPlausibleProxy()({ config });
}

export default defineNextConfig({
// your custom config....
})
import { withPlausibleProxy } from "next-plausible";

function defineNextConfig(config) {
return withPlausibleProxy()({ config });
}

export default defineNextConfig({
// your custom config....
})
when running the app I get warnings saying that warn - Invalid next.config.js options detected: ... which is true since config properties like whitelisted pages to receive images from are not being read. I am almost 100% sure I am doing something wrong with this step from the docs:
const { withPlausibleProxy } = require('next-plausible')

module.exports = withPlausibleProxy()({
// ...your next js config, if any
})
const { withPlausibleProxy } = require('next-plausible')

module.exports = withPlausibleProxy()({
// ...your next js config, if any
})
also does anyone know how well plausible proxied deals with Brave & ublock origin?
4 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Mordi
MordiOP2y ago
is securityHeaders something in your server.mjs?
Mordi
MordiOP2y ago
nvm think I got it, secuirtiyHeaderas in the ones Nextjs provide, ie. https://nextjs.org/docs/advanced-features/security-headers I think I got it working now, Thanks!
Advanced Features: Security Headers | Next.js
Improve the security of your Next.js application by adding HTTP response headers.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server