Skip to content

Commit

Permalink
feat: expose X-ArNS-* headers for CORS requests
Browse files Browse the repository at this point in the history
Gives browsers cross domain domain access to X-ArNS-* headers. This
simplifies construction of browser based gateway behavior observation
apps.
  • Loading branch information
elliotsayes authored and djwhitt committed Oct 13, 2023
1 parent ac5fb06 commit ee03255
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ if (config.START_WRITERS) {
// HTTP server
const app = express();

app.use(cors());
app.use(
cors({
exposedHeaders: ['X-ArNS-Resolved-Id', 'X-ArNS-TTL-Seconds'],
}),
);

app.use(arnsRouter);
app.use(openApiRouter);
Expand Down

0 comments on commit ee03255

Please sign in to comment.