Skip to content

Commit

Permalink
fix: post converted to get by proxy (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingAleCR authored Aug 12, 2024
1 parent f1fd16d commit 5e8df6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ app.set('trust proxy', true)

// ensure HTTPS only (X-Forwarded-Proto comes from Fly)
app.use((req, res, next) => {
if (req.method !== 'GET') return next()

const proto = req.get('X-Forwarded-Proto')
const host = getHost(req)
if (proto === 'http') {
Expand Down

0 comments on commit 5e8df6f

Please sign in to comment.