Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Changed default cors proxy server to the third-party service #280

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nginx/crossnote-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ server {

location /cors/ {
# We don't host this service ourselves anymore;
# Redirect requests to https://cors.isomorphic-git.org
return 301 https://cors.isomorphic-git.org;
# Redirect requests to https://isomorphic-git-cors-proxy.huaji.store
return 301 https://isomorphic-git-cors-proxy.huaji.store;
}

location / {
Expand Down
4 changes: 2 additions & 2 deletions src/components/AddNotebookDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function AddNotebookDialog(props: Props) {
const [gitUsername, setGitUsername] = useState<string>("");
const [gitPassword, setGitPassword] = useState<string>("");
const [gitCorsProxy, setGitCorsProxy] = useState<string>(
"https://cors.isomorphic-git.org",
"https://isomorphic-git-cors-proxy.huaji.store",
);
const [
rememberCredentialsChecked,
Expand Down Expand Up @@ -282,7 +282,7 @@ export default function AddNotebookDialog(props: Props) {
/>
<TextField
label={t("general/cors-proxy")}
placeholder={"https://cors.isomorphic-git.org"}
placeholder={"https://isomorphic-git-cors-proxy.huaji.store"}
fullWidth={true}
value={gitCorsProxy}
onChange={(event) => setGitCorsProxy(event.target.value)}
Expand Down
4 changes: 2 additions & 2 deletions src/components/ConfigureNotebookDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function ConfigureNotebookDialog(props: Props) {
const [gitUsername, setGitUsername] = useState<string>("");
const [gitPassword, setGitPassword] = useState<string>("");
const [gitCorsProxy, setGitCorsProxy] = useState<string>(
"https://cors.isomorphic-git.org",
"https://isomorphic-git-cors-proxy.huaji.store",
);
const [showUsername, setShowUsername] = useState<boolean>(false);
const [showPassword, setShowPassword] = useState<boolean>(false);
Expand Down Expand Up @@ -233,7 +233,7 @@ export default function ConfigureNotebookDialog(props: Props) {
></TextField>
<TextField
label={t("general/cors-proxy")}
placeholder={"https://cors.isomorphic-git.org"}
placeholder={"https://isomorphic-git-cors-proxy.huaji.store"}
fullWidth={true}
value={gitCorsProxy}
onChange={(event) => setGitCorsProxy(event.target.value)}
Expand Down
4 changes: 2 additions & 2 deletions src/containers/crossnote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -837,13 +837,13 @@ function useCrossnoteContainer(initialState: InitialState) {
} else {
/*
notebook = await crossnote.cloneNotebook({
corsProxy: "https://cors.isomorphic-git.org",
corsProxy: "https://isomorphic-git-cors-proxy.huaji.store",
gitURL: "https://github.com/0xGG/crossnote-doc.git"
});
*/
notebook = await crossnote.addNotebook({
name: "Drafts",
corsProxy: "https://cors.isomorphic-git.org",
corsProxy: "https://isomorphic-git-cors-proxy.huaji.store",
gitURL: "",
});
await pfs.writeFile(
Expand Down
2 changes: 1 addition & 1 deletion src/lib/crossnote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ export default class Crossnote {
typeof notebook.gitCorsProxy === "string" &&
notebook.gitCorsProxy.startsWith("https://crossnote.app/cors")
) {
notebook.gitCorsProxy = "https://cors.isomorphic-git.org";
notebook.gitCorsProxy = "https://isomorphic-git-cors-proxy.huaji.store";
}

if (n.directoryHandle) {
Expand Down