blomqma / next-rest-framework

Type-safe, self-documenting APIs for Next.js
https://next-rest-framework.vercel.app
Other
155 stars 20 forks source link

Routes don't appear in proxy #76

Closed SaadBazaz closed 1 year ago

SaadBazaz commented 1 year ago

I've proxied my NextJS server (http://localhost:3000 -> https://localhost:3001) due to another package.

I can't see routes on the https route. http, however, work fine.

blomqma commented 1 year ago

Could you provide some details on how your proxy is set up? Are you perhaps using the Next.js rewrites?

SaadBazaz commented 1 year ago

My package.json:

"scripts": {
    "dev": "npx local-ssl-proxy --source 3001 --target 3000 & next dev",
    "build": "yarn generatespec && next build",
    "start": "next start",
    "lint": "next lint",
    "generateapi": "npx @rtk-query/codegen-openapi openapi-config.ts",
    "generatespec": "npx next-rest-framework generate && npx cpy openapi.json public/api"
  },
SaadBazaz commented 1 year ago

I basically query https://localhost:3001 instead of http://localhost:3000, so I can get the benefit of HTTPS (For a specific, non-rest-framework usecase)

blomqma commented 1 year ago

Thanks, I managed to reproduce the issue and this should now be fixed in v3.1.1.