-
Notifications
You must be signed in to change notification settings - Fork 480
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
docs: added pomerium as a reverse proxy option #10453
docs: added pomerium as a reverse proxy option #10453
Conversation
@nickytonline is attempting to deploy a commit to the PostHog Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Don't know if others run into this issue, but I had to up the default max listeners to 15 in gatsby-node.ts, otherwise the dev build errors out. + const events = require('events');
+ events.EventEmitter.defaultMaxListeners = 15;
import path from 'path'
import { GatsbyNode } from 'gatsby'
const axios = require('axios')
export { createPages } from './gatsby/createPages'
export { onCreateNode, onPreInit } from './gatsby/onCreateNode'
export { createSchemaCustomization } from './gatsby/createSchemaCustomization'
export { sourceNodes } from './gatsby/sourceNodes'
export { onPostBuild } from './gatsby/onPostBuild'
export { createResolvers } from './gatsby/createResolvers'
export { onPreBootstrap } from './gatsby/onPreBootstrap'
// Implement the Gatsby API “onCreatePage”. This is
// called after every page is created.
export const onCreatePage: GatsbyNode['onCreatePage'] = async ({ page, actions }) => {
const { createPage } = actions
if (page.path.match(/^\/community\/profiles/)) {
page.matchPath = '/community/profiles/*'
createPage(page)
}
if (page.path.match(/^\/next\-steps/)) {
page.matchPath = '/next-steps/*'
createPage(page)
}
}
export const onCreateWebpackConfig: GatsbyNode['onCreateWebpackConfig'] = ({ stage, actions }) => {
actions.setWebpackConfig({
cache: process.env.NODE_ENV === 'development' || {
compression: 'gzip',
},
resolve: {
extensions: ['.js', '.ts', '.tsx'],
alias: {
'~': path.resolve(__dirname, 'src'),
lib: path.resolve(__dirname, 'src', 'lib'),
types: path.resolve(__dirname, 'src', 'types'),
images: path.resolve(__dirname, 'src', 'images'),
components: path.resolve(__dirname, 'src', 'components'),
logic: path.resolve(__dirname, 'src', 'logic'),
hooks: path.resolve(__dirname, 'src', 'hooks'),
},
},
})
}
exports.createPages = async ({ actions }) => {
const { createPage } = actions
try {
const response = await axios.get('https://jobs.ashbyhq.com/supabase')
const jobData = JSON.parse(response.data)
const jobs = jobData?.jobBoard?.jobPostings || []
// Create the jobs page with the data
createPage({
path: '/jobs',
component: require.resolve('./src/templates/jobs.tsx'),
context: {
jobs: jobs,
},
})
} catch (error) {
console.error('Error fetching jobs:', error)
}
} |
You want to change this from a draft PR? I'll review it once your ready and deal with any of the build issues :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but just making sure the headers are good.
I'll also add it to the nav properly
Ahh missed that. 😅 |
@nickytonline you want to add the images to a comment here or send them to my first name @posthog.com and I'll upload them to our CDN? |
|
c4bf037
to
2e9ac3a
Compare
Co-authored-by: Ian Vanagas <[email protected]>
Co-authored-by: Ian Vanagas <[email protected]>
Co-authored-by: Ian Vanagas <[email protected]>
Co-authored-by: Ian Vanagas <[email protected]>
Co-authored-by: Ian Vanagas <[email protected]>
Co-authored-by: Ian Vanagas <[email protected]>
Co-authored-by: Ian Vanagas <[email protected]>
b8ec8f6
to
c0b8623
Compare
Thanks Nick! |
Changes
This PR adds documentation for configuring Pomerium as a reverse proxy for PostHog.
Closes #10360
Checklist
vercel.json