Skip to content

Commit

Permalink
fix(routes): move metrics route after data handler PE-3142
Browse files Browse the repository at this point in the history
This prevents the metrics path from appearing on ArNS sites.
  • Loading branch information
djwhitt committed Mar 9, 2023
1 parent b11ba18 commit 13451a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ const app = express();
//);

app.use(cors());
app.use(promMid({ metricsPath: '/gateway_metrics' }));

const dataHandler = createDataHandler({
log,
Expand All @@ -217,6 +216,8 @@ app.use(
}),
);

app.use(promMid({ metricsPath: '/gateway_metrics' }));

// OpenAPI Spec
const openapiDocument = YAML.parse(
fs.readFileSync('docs/openapi.yaml', 'utf8'),
Expand Down

0 comments on commit 13451a0

Please sign in to comment.