mirror of
https://github.com/LCE-Hub/piston.git
synced 2026-08-03 01:03:03 +00:00
fix: cors proxy
This commit is contained in:
parent
2d086b571c
commit
bf26f9efc8
|
|
@ -69,7 +69,7 @@ function App() {
|
||||||
let timeoutId: number;
|
let timeoutId: number;
|
||||||
const poll = async () => {
|
const poll = async () => {
|
||||||
try {
|
try {
|
||||||
const proxyRoute = import.meta.env.DEV ? '/github-proxy' : 'https://proxy.corsfix.com/?https://github.com';
|
const proxyRoute = import.meta.env.DEV ? '/github-proxy' : 'https://corsproxy.io/?url=https://github.com';
|
||||||
const res = await fetch(`${proxyRoute}/login/oauth/access_token`, {
|
const res = await fetch(`${proxyRoute}/login/oauth/access_token`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,7 @@ export default function UploadModal({ onClose, pat }: UploadModalProps) {
|
||||||
name,
|
name,
|
||||||
author: api.username,
|
author: api.username,
|
||||||
description,
|
description,
|
||||||
|
extended_description: "", //neo: TODO: implement
|
||||||
category,
|
category,
|
||||||
thumbnail: thumbnail.name,
|
thumbnail: thumbnail.name,
|
||||||
zips: zipsMapping,
|
zips: zipsMapping,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue