CORS
This commit is contained in:
parent
4107f3b5f6
commit
c1c6c16678
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
3
app.js
3
app.js
@ -21,7 +21,8 @@ function generateQuickCmd() {
|
|||||||
fetch("https://paste.nevets.tech/api/", {
|
fetch("https://paste.nevets.tech/api/", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {'Content-Type': 'application/json'},
|
headers: {'Content-Type': 'application/json'},
|
||||||
body: "{'format':'url','content':'" + buildCmd() + "','expires':3600,'lexer':'bash'}"
|
body: "{'format':'url','content':'" + buildCmd() + "','expires':3600,'lexer':'bash'}",
|
||||||
|
mode: "cors"
|
||||||
}).then(res => res.json().then(json => {
|
}).then(res => res.json().then(json => {
|
||||||
document.getElementById("script").innerText = "curl -s " + json.url + "/raw | bash";
|
document.getElementById("script").innerText = "curl -s " + json.url + "/raw | bash";
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user