Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -35,6 +35,8 @@ const CONFIG = {
|
|
| 35 |
'mistral-large': 'bedrock-mistral.mistral-large-2407-v1-0'
|
| 36 |
},
|
| 37 |
DEFAULT_HEADERS: {
|
|
|
|
|
|
|
| 38 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
|
| 39 |
"Cache-Control": "no-cache, no-store",
|
| 40 |
"Connection": "keep-alive",
|
|
@@ -98,6 +100,7 @@ class TokenManager {
|
|
| 98 |
CONFIG.DEFAULT_HEADERS["anti-csrftoken-a2z"] = Tokens[currentIndex].anti_csrftoken_a2z;
|
| 99 |
CONFIG.DEFAULT_HEADERS.Cookie = `idToken=${Tokens[currentIndex].idToken}; pr_refresh_token=${Tokens[currentIndex].pr_refresh_token};aws-waf-token=${Tokens[currentIndex].aws_waf_token};cwr_s=${Tokens[currentIndex].cwr_s};cwr_u=${sessionId}`;
|
| 100 |
CONFIG.DEFAULT_HEADERS.referer = Tokens[currentIndex].refreshUrl;
|
|
|
|
| 101 |
}
|
| 102 |
|
| 103 |
async updateTokens(response, isWaf = false) {
|
|
|
|
| 35 |
'mistral-large': 'bedrock-mistral.mistral-large-2407-v1-0'
|
| 36 |
},
|
| 37 |
DEFAULT_HEADERS: {
|
| 38 |
+
"Host":"partyrock.aws",
|
| 39 |
+
"reqable-id": "",
|
| 40 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
|
| 41 |
"Cache-Control": "no-cache, no-store",
|
| 42 |
"Connection": "keep-alive",
|
|
|
|
| 100 |
CONFIG.DEFAULT_HEADERS["anti-csrftoken-a2z"] = Tokens[currentIndex].anti_csrftoken_a2z;
|
| 101 |
CONFIG.DEFAULT_HEADERS.Cookie = `idToken=${Tokens[currentIndex].idToken}; pr_refresh_token=${Tokens[currentIndex].pr_refresh_token};aws-waf-token=${Tokens[currentIndex].aws_waf_token};cwr_s=${Tokens[currentIndex].cwr_s};cwr_u=${sessionId}`;
|
| 102 |
CONFIG.DEFAULT_HEADERS.referer = Tokens[currentIndex].refreshUrl;
|
| 103 |
+
CONFIG.DEFAULT_HEADERS["reqable-id"] = `reqable-id-${sessionId}`;
|
| 104 |
}
|
| 105 |
|
| 106 |
async updateTokens(response, isWaf = false) {
|