From 206b010787f01ea242d30ec488406808a9ae9a5e Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 5 Feb 2021 12:38:22 +0100 Subject: [PATCH] test middleware --- docker/kratos/oathkeeper/access-rules.yml | 2 +- packages/dashboard/Dockerfile | 1 - packages/dashboard/{ => src}/pages/_app.js | 0 packages/dashboard/{ => src}/pages/api/hello.js | 2 +- packages/dashboard/{ => src}/pages/auth/login.js | 4 ++-- packages/dashboard/{ => src}/pages/auth/registration.js | 0 packages/dashboard/{ => src}/pages/downloads.js | 0 packages/dashboard/{ => src}/pages/index.js | 2 +- packages/dashboard/{ => src}/pages/payments.js | 0 packages/dashboard/{pages/auth => src/pages}/recovery.js | 0 packages/dashboard/{ => src}/pages/uploads.js | 0 packages/dashboard/tailwind.config.js | 2 +- 12 files changed, 6 insertions(+), 7 deletions(-) rename packages/dashboard/{ => src}/pages/_app.js (100%) rename packages/dashboard/{ => src}/pages/api/hello.js (96%) rename packages/dashboard/{ => src}/pages/auth/login.js (98%) rename packages/dashboard/{ => src}/pages/auth/registration.js (100%) rename packages/dashboard/{ => src}/pages/downloads.js (100%) rename packages/dashboard/{ => src}/pages/index.js (63%) rename packages/dashboard/{ => src}/pages/payments.js (100%) rename packages/dashboard/{pages/auth => src/pages}/recovery.js (100%) rename packages/dashboard/{ => src}/pages/uploads.js (100%) diff --git a/docker/kratos/oathkeeper/access-rules.yml b/docker/kratos/oathkeeper/access-rules.yml index 97ac5ed3..cfb1eeed 100644 --- a/docker/kratos/oathkeeper/access-rules.yml +++ b/docker/kratos/oathkeeper/access-rules.yml @@ -57,7 +57,7 @@ preserve_host: true url: "http://dashboard:3000" match: - url: "http://oathkeeper:4455/<{error,recovery,verify,auth/*,**.css,**.js}{/,}>" + url: "http://oathkeeper:4455/<{error,verify,auth/*,**.css,**.js}{/,}>" methods: - GET authenticators: diff --git a/packages/dashboard/Dockerfile b/packages/dashboard/Dockerfile index 18d5c3b5..348b0cee 100644 --- a/packages/dashboard/Dockerfile +++ b/packages/dashboard/Dockerfile @@ -2,7 +2,6 @@ FROM node:14.15.0-alpine WORKDIR /usr/app -COPY pages ./pages COPY public ./public COPY src ./src COPY styles ./styles diff --git a/packages/dashboard/pages/_app.js b/packages/dashboard/src/pages/_app.js similarity index 100% rename from packages/dashboard/pages/_app.js rename to packages/dashboard/src/pages/_app.js diff --git a/packages/dashboard/pages/api/hello.js b/packages/dashboard/src/pages/api/hello.js similarity index 96% rename from packages/dashboard/pages/api/hello.js rename to packages/dashboard/src/pages/api/hello.js index 2693b28f..8a73926a 100644 --- a/packages/dashboard/pages/api/hello.js +++ b/packages/dashboard/src/pages/api/hello.js @@ -2,7 +2,7 @@ import jwt from "express-jwt"; import jwks from "jwks-rsa"; -import config from "../../src/config"; +import config from "../../config"; // This middleware assumes that the app is secured using ORY Oathkeeper, in which case we // verify the JSON Web Token issued by ORY Oathkeeper using the jwt-express middleware. diff --git a/packages/dashboard/pages/auth/login.js b/packages/dashboard/src/pages/auth/login.js similarity index 98% rename from packages/dashboard/pages/auth/login.js rename to packages/dashboard/src/pages/auth/login.js index 5f981d94..1a57e518 100644 --- a/packages/dashboard/pages/auth/login.js +++ b/packages/dashboard/src/pages/auth/login.js @@ -1,6 +1,6 @@ import Link from "next/link"; import { Configuration, PublicApi } from "@ory/kratos-client"; -import config from "../../src/config"; +import config from "../../config"; const kratos = new PublicApi(new Configuration({ basePath: config.kratos.public })); @@ -127,7 +127,7 @@ export default function Login({ flow }) { */}
- + Forgot your password?
diff --git a/packages/dashboard/pages/auth/registration.js b/packages/dashboard/src/pages/auth/registration.js similarity index 100% rename from packages/dashboard/pages/auth/registration.js rename to packages/dashboard/src/pages/auth/registration.js diff --git a/packages/dashboard/pages/downloads.js b/packages/dashboard/src/pages/downloads.js similarity index 100% rename from packages/dashboard/pages/downloads.js rename to packages/dashboard/src/pages/downloads.js diff --git a/packages/dashboard/pages/index.js b/packages/dashboard/src/pages/index.js similarity index 63% rename from packages/dashboard/pages/index.js rename to packages/dashboard/src/pages/index.js index e696a8ff..53aaf856 100644 --- a/packages/dashboard/pages/index.js +++ b/packages/dashboard/src/pages/index.js @@ -1,4 +1,4 @@ -import Layout from "../src/components/Layout"; +import Layout from "./components/Layout"; export default function Home() { return ; diff --git a/packages/dashboard/pages/payments.js b/packages/dashboard/src/pages/payments.js similarity index 100% rename from packages/dashboard/pages/payments.js rename to packages/dashboard/src/pages/payments.js diff --git a/packages/dashboard/pages/auth/recovery.js b/packages/dashboard/src/pages/recovery.js similarity index 100% rename from packages/dashboard/pages/auth/recovery.js rename to packages/dashboard/src/pages/recovery.js diff --git a/packages/dashboard/pages/uploads.js b/packages/dashboard/src/pages/uploads.js similarity index 100% rename from packages/dashboard/pages/uploads.js rename to packages/dashboard/src/pages/uploads.js diff --git a/packages/dashboard/tailwind.config.js b/packages/dashboard/tailwind.config.js index 069f2278..626a4659 100644 --- a/packages/dashboard/tailwind.config.js +++ b/packages/dashboard/tailwind.config.js @@ -1,5 +1,5 @@ module.exports = { - purge: ["./pages/**/*.js", "./src/**/*.js"], + purge: ["./src/**/*.js"], darkMode: false, // or 'media' or 'class' theme: { extend: {},