Spaces:
Sleeping
Sleeping
Use durable room13 tunnel with browser-like UA for github-issues worker
Browse files- src/room13-worker.ts +4 -1
src/room13-worker.ts
CHANGED
|
@@ -168,7 +168,10 @@ export class GitHubIssuesRoom13WorkerRuntime {
|
|
| 168 |
}
|
| 169 |
|
| 170 |
private async request<T = unknown>(method: string, path: string, body?: unknown) {
|
| 171 |
-
const headers: Record<string, string> = {
|
|
|
|
|
|
|
|
|
|
| 172 |
if (this.bearerToken) headers.Authorization = `Bearer ${this.bearerToken}`;
|
| 173 |
const response = await fetch(`${this.baseUrl}${path}`, {
|
| 174 |
method,
|
|
|
|
| 168 |
}
|
| 169 |
|
| 170 |
private async request<T = unknown>(method: string, path: string, body?: unknown) {
|
| 171 |
+
const headers: Record<string, string> = {
|
| 172 |
+
'content-type': 'application/json',
|
| 173 |
+
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
|
| 174 |
+
};
|
| 175 |
if (this.bearerToken) headers.Authorization = `Bearer ${this.bearerToken}`;
|
| 176 |
const response = await fetch(`${this.baseUrl}${path}`, {
|
| 177 |
method,
|