(
url: string,
baseHeaders: Record<string, string>,
options: DeviceLoginHttpOptions = {},
)
| 144 | }; |
| 145 | |
| 146 | const headersForUrl = ( |
| 147 | url: string, |
| 148 | baseHeaders: Record<string, string>, |
| 149 | options: DeviceLoginHttpOptions = {}, |
| 150 | ): Record<string, string> => { |
| 151 | const configured = |
| 152 | options.headers && (!options.serverOrigin || isSameOrigin(url, options.serverOrigin)) |
| 153 | ? options.headers |
| 154 | : {}; |
| 155 | return { ...configured, ...baseHeaders }; |
| 156 | }; |
| 157 | |
| 158 | const post = async ( |
| 159 | url: string, |
no test coverage detected