Open
Description
Environment
- NodeJS: v23.5.0
- "nuxt": "^3.15.0",
- "vue": "latest",
- "h3": "^1.13.0"
Reproduction
API
export default defineEventHandler(async (event) => {
const url = getRequestURL(event);
console.log(url)
return ""
});
Call Url: http://localhost:30301/api/v1/system
URL { href: 'http://localhost/api/v1/system',
origin: 'http://localhost',
protocol: 'http:',
username: '',
password: '',
host: 'localhost',
hostname: 'localhost',
port: '',
pathname: '/api/v1/system',
search: '',
searchParams: URLSearchParams {},
hash: '' }
Describe the bug
The value of url.host
should be localhost:30301
instead of localhost
.
So I think getRequestURL
function is not working correctly.
Could you like help me check it?
Additional context
No response
Logs
No response
Activity