Skip to content

Conversation

@SajanGhimire1
Copy link

…ve security headers

The previous next.config.ts contained unsafe rewrite rules that created an unauthenticated proxy/SSRF vulnerability:

// REMOVED - Security risk
rewrites: async function rewrites() {
  return [
    {
      source: '/api/:path*',
      destination: 'https://opensource.microsoft.com/api/:path*',
    },
    {
      source: '/avatars/:path*',
      destination: 'https://opensource.microsoft.com/avatars/:path*',
    },
  ]
}

…ve security headers

The previous `next.config.ts` contained unsafe rewrite rules that created an unauthenticated proxy/SSRF vulnerability:

```typescript
// REMOVED - Security risk
rewrites: async function rewrites() {
  return [
    {
      source: '/api/:path*',
      destination: 'https://opensource.microsoft.com/api/:path*',
    },
    {
      source: '/avatars/:path*',
      destination: 'https://opensource.microsoft.com/avatars/:path*',
    },
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant