- Created backend structure with Go, including main application logic and API endpoints. - Added Docker support for both development and production environments. - Introduced frontend using Nuxt 3 with Tailwind CSS for styling. - Included configuration files for Docker and environment variables. - Established basic documentation for contributing, development, and deployment processes. - Set up .gitignore and .dockerignore files to manage ignored files in the repository.
13 lines
416 B
TypeScript
13 lines
416 B
TypeScript
/**
|
|
* Reject requests with malformed URI before they reach Vite.
|
|
* Vite's static middleware calls decodeURI() and throws "URI malformed" on invalid sequences (e.g. %2: or %91).
|
|
*/
|
|
export default defineEventHandler((event) => {
|
|
const path = event.path ?? event.node.req.url ?? ''
|
|
try {
|
|
decodeURI(path)
|
|
} catch {
|
|
throw createError({ statusCode: 400, statusMessage: 'Bad Request' })
|
|
}
|
|
})
|