Skip to content

Commit 7a88a12

Browse files
committed
ughhhhhhhhhh
1 parent 690ceb7 commit 7a88a12

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

api/gist.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ function createGist(content, state) {
3131
}
3232

3333
module.exports = (req, res) => {
34-
if (req.headers.origin !== 'https://engine262.js.org') {
35-
return res.status(403).send('403');
36-
}
3734
if (req.method === 'OPTIONS') {
3835
res.writeHead(200, { 'Allow': 'OPTIONS, POST' });
3936
res.end();

now.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44
"routes": [
55
{
66
"src": "/api/gist",
7-
"dest": "/api/gist.js",
8-
"headers": {
9-
"Access-Control-Allow-Origin": "https://engine262.js.org",
10-
"Access-Control-Allow-Headers": "content-type",
11-
"Access-Control-Allow-Methods": "OPTIONS, POST"
12-
}
7+
"dest": "/api/gist.js"
138
}
149
],
1510
"env": {

src/state.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const saveSpan = document.querySelector('#save-to-gist-output');
9191
document.querySelector('#save-to-gist')
9292
.addEventListener('click', () => {
9393
saveSpan.textContent = 'Saving...';
94-
state.then((s) => fetch('https://engine262-api.engine262.now.sh/api/gist', {
94+
state.then((s) => fetch('/api/gist', {
9595
method: 'POST',
9696
headers: {
9797
'Content-Type': 'application/json',

0 commit comments

Comments
 (0)