Currently, this package does not support configuring the HTTP request headers of Tasks. These headers are sent along with the HTTP request to the Laravel backend to run a given job.
My use case is for authentication, as my backend requires a secret header to be passed. Basic auth could be another use case.
I am not sure where those headers could be defined, as ENV vars might be cumbersome. I imagine a global set of headers would be fine to be added to all Tasks, rather than per-task or per-queue headers.
Currently, this package does not support configuring the HTTP request headers of Tasks. These headers are sent along with the HTTP request to the Laravel backend to run a given job.
My use case is for authentication, as my backend requires a secret header to be passed. Basic auth could be another use case.
More info on the
headers
option for Tasks: https://cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues.tasks#httprequestPossible implementation:
This could happen near where other properties of the Task are formed, such as the URL and HTTP Method: https://github.com/stackkit/laravel-google-cloud-tasks-queue/blob/508d1ca934d74c2c31d564f385852b2a49350ab5/src/CloudTasksQueue.php#L139-L141
I am not sure where those headers could be defined, as ENV vars might be cumbersome. I imagine a global set of headers would be fine to be added to all Tasks, rather than per-task or per-queue headers.