Devin Stewart
Devin Stewart
@volks73 -- Brilliant!!! I was so close. Reading your docs I did see the `-L,--linker-arg` and tried that in place of `-C,--compiler-arg`. What I failed to notice, is that it...
I can not share this exact project as it is an internal company project, but over the weekend I can throw something together that is basically a ping `axum` server....
@volks73 Feel free to checkout a [mock](https://github.com/devinstewart/rust_windows_service_axum) of what I did. Hope it helps and thanks for the crate, would have never gotten through WiX as quickly on my own.
Thanks! Done and done.
What you need is: ``` middleNames: Joi.string().allow(''), ``` See [Joi String Documentation](https://joi.dev/api/?v=17.3.0#string). The issue of empty strings is addressed at the top.
Give something like this a try: ```js server.ext('onRequest', (request, h) => { const routes = ['/login2']; if (routes.includes(request.path)) { return h.redirect('/login').code(301).takeover(); } return h.continue; }); server.route({ method: 'GET', path: '/login',...
It is explained in this section of the [Documentation](https://hapi.dev/api/?v=20.1.0#-routeoptionsvalidateheaders).
I believe that if you put ```javascript const result = validationSchema.validate(JSON.parse(request.payload.toString())); ``` What you were sending was JSON text vs a JavaScript Object.
So that tells me that the `string` being created by: ```javascript request.payload.toString() ``` Is **not** valid JSON. I would venture to guess that the Unexpected token O is the beginning...
@ihatelactose - I ran into a similar situation about a year ago, and the best solution that I came up with was to make the payload validation the last in...