Setting Origin Header in K6.http

Hi all, does anyone know if it is possible to set the Origin header with k6.http? I have tried but it doesn’t seem to get passed in the request.

Hi @stevenrichardson !

here’s a sample script showig how to set the origin header:

import http from 'k6/http'

export default () => {
    let params = {
        headers: {
            'Content-Type': 'application/json',
            'Origin': 'my-domain.test',
        }
    };
    http.get(`https://webhook.site/7176ddc7-128f-4a58-b634-29c4cac4f01e`, params);
} 

And here’s how it looks like on webhook.site:

image