@jonatandor35 Hi, I have provided a regular URL and it shows a 403 error. I will try to ask again in the community what could be the best possible solution. Thank you so much for your continued support.
Hey @thecaninecompanyin !
I see you use the ok() method. This method is used when you want to send a response with status 200 .
If you want to send the status with 301 status try to use a response() method with any custom status code.
Demo:
https://alexanderz5.wixsite.com/redirect-example/_functions/veloRef
import { response } from 'wix-http-functions';
export function get_veloRef() {
const url = 'https://www.wix.com/velo/reference/wix-http-functions/response';
return response({
status: 301,
headers: {
location: url,
},
});
}
Hi, thank you so much for your reply! It solved the issue. I guess I haven’t read the docs fully.
@jonatandor35 Hi, I have solved the issue using Alexander’s answer below. Thank you for your support.