2024-07-21 14:12:19 -05:00
|
|
|
const removeImports = require("next-remove-imports")();
|
|
|
|
|
|
|
|
module.exports = removeImports({
|
|
|
|
reactStrictMode: true,
|
2023-12-23 20:33:25 -06:00
|
|
|
images: {
|
2024-12-11 11:23:14 -06:00
|
|
|
domains: ['localhost', 'secure.gravatar.com', 'plebdevs-three.vercel.app', 'plebdevs.com', 'plebdevs-bucket.nyc3.cdn.digitaloceanspaces.com', 'avatars.githubusercontent.com'],
|
2023-12-23 20:33:25 -06:00
|
|
|
},
|
2024-07-21 14:12:19 -05:00
|
|
|
webpack(config, options) {
|
|
|
|
return config;
|
|
|
|
},
|
2024-09-01 12:40:25 -05:00
|
|
|
async rewrites() {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: '/api/cron',
|
|
|
|
destination: '/api/cron',
|
|
|
|
},
|
2024-09-16 17:13:23 -05:00
|
|
|
{
|
|
|
|
source: "/.well-known/nostr.json",
|
|
|
|
destination: "/api/nip05",
|
2024-09-18 14:59:04 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
source: '/.well-known/lnurlp/:slug',
|
|
|
|
destination: '/api/lightning-address/lnurlp/:slug',
|
2024-09-16 17:13:23 -05:00
|
|
|
}
|
2024-09-01 12:40:25 -05:00
|
|
|
];
|
|
|
|
},
|
2024-10-01 17:52:38 -05:00
|
|
|
async headers() {
|
|
|
|
return [
|
2024-11-15 14:31:53 -06:00
|
|
|
{
|
|
|
|
source: "/.well-known/:slug*",
|
|
|
|
headers: [
|
|
|
|
{
|
|
|
|
key: "Access-Control-Allow-Origin",
|
|
|
|
value: "*"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "Access-Control-Allow-Methods",
|
|
|
|
value: "GET, POST, OPTIONS"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "Access-Control-Allow-Headers",
|
|
|
|
value: "Content-Type, Authorization"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2024-10-01 17:52:38 -05:00
|
|
|
{
|
2024-11-15 14:25:39 -06:00
|
|
|
source: "/api/:slug*",
|
2024-10-01 17:52:38 -05:00
|
|
|
headers: [
|
|
|
|
{
|
|
|
|
key: "Access-Control-Allow-Origin",
|
2024-11-15 16:27:55 -06:00
|
|
|
value: process.env.BACKEND_URL
|
2024-10-01 17:52:38 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "Access-Control-Allow-Methods",
|
|
|
|
value: "GET, POST, PUT, DELETE, OPTIONS",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "Access-Control-Allow-Headers",
|
|
|
|
value: "Content-Type, Authorization",
|
|
|
|
},
|
2024-10-01 18:00:59 -05:00
|
|
|
{
|
|
|
|
key: "X-Frame-Options",
|
|
|
|
value: "DENY",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "X-Content-Type-Options",
|
|
|
|
value: "nosniff",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "Referrer-Policy",
|
|
|
|
value: "strict-origin-when-cross-origin",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "Content-Security-Policy",
|
|
|
|
value: "default-src 'self'; frame-ancestors 'none';",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: "Strict-Transport-Security",
|
|
|
|
value: "max-age=31536000; includeSubDomains; preload"
|
|
|
|
},
|
2024-10-01 17:52:38 -05:00
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
},
|
2024-09-30 20:35:07 -05:00
|
|
|
env: {
|
|
|
|
KV_URL: process.env.NODE_ENV !== 'production'
|
|
|
|
? process.env.REDIS_URL
|
|
|
|
: process.env.KV_URL,
|
|
|
|
KV_REST_API_URL: process.env.NODE_ENV !== 'production'
|
|
|
|
? process.env.REDIS_URL
|
|
|
|
: process.env.KV_REST_API_URL,
|
|
|
|
KV_REST_API_TOKEN: process.env.NODE_ENV !== 'production'
|
|
|
|
? 'dummy_token'
|
|
|
|
: process.env.KV_REST_API_TOKEN,
|
|
|
|
KV_REST_API_READ_ONLY_TOKEN: process.env.NODE_ENV !== 'production'
|
|
|
|
? 'dummy_token'
|
|
|
|
: process.env.KV_REST_API_READ_ONLY_TOKEN,
|
|
|
|
},
|
2024-07-21 14:12:19 -05:00
|
|
|
});
|