Skip to content

Commit b7049e2

Browse files
author
Kris Brown
committed
Remove unnecessary CORS
1 parent 5d8dd71 commit b7049e2

2 files changed

Lines changed: 1 addition & 19 deletions

File tree

packages/algjulia-interop/scripts/endpoint.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ function CorsHandler(handle)
2323
return HTTP.Response(200, CORS_HEADERS)
2424
else
2525
r = handle(req)
26-
append!(r.headers, ["Access-Control-Allow-Origin" => "*"])
26+
r.headers = CORS_HEADERS
2727
r
28-
2928
end
3029
end
3130
end

packages/frontend/src/stdlib/analyses/tabular_view.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,6 @@ import type { DiagramAnalysisProps } from "../../analysis";
66
import type { GraphLayoutConfig } from "../../visualization";
77
import "./tabular_view.css";
88

9-
/** This should live somewhere more general, once multiple analyses use local
10-
computation. Furthermore, although it can default to localhost 8080, one
11-
ought be able to put some AWS credentials in their user profile to run
12-
remote computation there.
13-
*/
14-
const config = {
15-
url: "http://127.0.0.1:8080",
16-
method: "post",
17-
headers: {
18-
"Access-Control-Allow-Origin": "*",
19-
"Access-Control-Allow-Methods": "POST, PUT, DELETE, GET, OPTIONS",
20-
"Access-Control-Allow-Headers": "*",
21-
"Access-Control-Allow-Credentials": "false",
22-
},
23-
};
24-
259
/** Create a table from row-wise data */
2610
function createTable(headers: Array<string>, data: Array<Array<string>>) {
2711
return (
@@ -122,7 +106,6 @@ export default function TabularView(
122106
method: "POST",
123107
headers: {
124108
"Content-Type": "application/json",
125-
...config.headers,
126109
},
127110
body: JSON.stringify({
128111
model: model?.presentation(),

0 commit comments

Comments
 (0)