mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
fix(errors): surface react docker errors to front end [EE-7053] (#11726)
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
55667a878a
commit
6b5a402962
17 changed files with 107 additions and 142 deletions
17
app/react/docker/proxy/addNodeHeader.ts
Normal file
17
app/react/docker/proxy/addNodeHeader.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { RawAxiosRequestHeaders } from 'axios';
|
||||
|
||||
import { agentTargetHeader } from '@/portainer/services/axios';
|
||||
|
||||
export function addNodeHeader(
|
||||
nodeName?: string,
|
||||
headers: RawAxiosRequestHeaders = {}
|
||||
) {
|
||||
if (!nodeName) {
|
||||
return headers;
|
||||
}
|
||||
|
||||
return {
|
||||
...headers,
|
||||
[agentTargetHeader]: nodeName,
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue