-
Notifications
You must be signed in to change notification settings - Fork 80
Enable API CORS for dashboard
Daniel Wang edited this page Jan 14, 2022
·
2 revisions
Linux/macOS Shell
btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
btfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT","GET","POST"]'
Windows Batch
btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "["""*"""]"
btfs config --json API.HTTPHeaders.Access-Control-Allow-Methods "["""PUT""", """GET""", """POST"""]"
Windows PowerShell
btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[\"*\"]'
btfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"GET\", \"POST\"]'
Modify .btfs/config directly
"API": {
"HTTPHeaders": {
"Access-Control-Allow-Methods": [
"PUT",
"GET",
"POST"
],
"Access-Control-Allow-Origin": [
"*"
]
}
}