refactor: more review refinements
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
committed by
Patrik Oldsberg
parent
ffd71105a6
commit
b01e709ead
@@ -62,9 +62,9 @@ describe('appPlugin', () => {
|
||||
fetch(`http://localhost:${server.port()}/api/app/derp.html`).then(res =>
|
||||
res.text(),
|
||||
),
|
||||
).resolves.toMatch('winning');
|
||||
).resolves.toBe('winning');
|
||||
await expect(
|
||||
fetch(`http://localhost:${server.port()}`).then(res => res.text()),
|
||||
).resolves.toMatch('winning');
|
||||
).resolves.toBe('winning');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -40,7 +40,6 @@ import {
|
||||
import { ConfigSchema } from '@backstage/config-loader';
|
||||
import { AuthService, HttpAuthService } from '@backstage/backend-plugin-api';
|
||||
import { AuthenticationError } from '@backstage/errors';
|
||||
import { createCookieAuthRefreshMiddleware } from '@backstage/plugin-auth-node';
|
||||
|
||||
// express uses mime v1 while we only have types for mime v2
|
||||
type Mime = { lookup(arg0: string): string };
|
||||
@@ -174,8 +173,6 @@ export async function createRouter(
|
||||
if (enablePublicEntryPoint && auth && httpAuth) {
|
||||
const publicRouter = Router();
|
||||
|
||||
publicRouter.use(createCookieAuthRefreshMiddleware({ auth, httpAuth }));
|
||||
|
||||
publicRouter.use(async (req, _res, next) => {
|
||||
const credentials = await httpAuth.credentials(req, {
|
||||
allow: ['user', 'service', 'none'],
|
||||
|
||||
Reference in New Issue
Block a user