mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Fix CORS proxy for APK Builder API key requests
Use Shakespeare's built-in corsProxy config and proxyUrl function instead of hardcoded corsproxy.io which had an incorrect URL format. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
1 parent
fb6d2cac82
commit
4c56e37212
2 files changed
+5
-2
No files matched your search
@@ -20,6 +20,7 @@ import {
|
||||
import { ExternalFavicon } from '@/components/ExternalFavicon';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useCurrentUser } from '@/hooks/useCurrentUser';
|
||||
import { useAppContext } from '@/hooks/useAppContext';
|
||||
import { requestBuildServerApiKey } from '@/lib/nip98';
|
||||
|
||||
interface PresetProvider {
|
||||
@@ -89,6 +90,7 @@ export function AddProviderDialog({
|
||||
}: AddProviderDialogProps) {
|
||||
const { t } = useTranslation();
|
||||
const { user } = useCurrentUser();
|
||||
const { config } = useAppContext();
|
||||
const [apiKey, setApiKey] = useState('');
|
||||
const [accountId, setAccountId] = useState('');
|
||||
const [organizationId, setOrganizationId] = useState('');
|
||||
@@ -124,7 +126,7 @@ export function AddProviderDialog({
|
||||
const result = await requestBuildServerApiKey(
|
||||
user.signer,
|
||||
buildServerUrl.trim(),
|
||||
preset.proxy ? 'https://corsproxy.io/?' : undefined
|
||||
preset.proxy ? config.corsProxy : undefined
|
||||
);
|
||||
setApiKey(result.apiKey);
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user