Skip to content

Commit a9228a0

Browse files
committedDec 1, 2024··
feat: atproto-did file
1 parent 19439c3 commit a9228a0

File tree

5 files changed

+59
-23
lines changed

5 files changed

+59
-23
lines changed
 

‎next.config.js

-22
This file was deleted.

‎next.config.ts

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import type { NextConfig } from 'next'
2+
3+
/* eslint-disable @typescript-eslint/no-var-requires */
4+
// const withBundleAnalyzer = require('@next/bundle-analyzer')({
5+
// enabled: process.env.ANALYZE === 'true',
6+
// })
7+
8+
const isProd = process.env.NODE_ENV === 'production' && process.env.APP_ENV !== 'staging'
9+
10+
const assetPrefix = isProd ? 'https://cdn.bratteng.com' : ''
11+
12+
/** @type {import('next').NextConfig} */
13+
const nextConfig = {
14+
// output: 'standalone',
15+
reactStrictMode: false,
16+
poweredByHeader: false,
17+
...(isProd && { assetPrefix }),
18+
serverRuntimeConfig: {},
19+
publicRuntimeConfig: {
20+
assetPrefix,
21+
},
22+
headers: async () => [
23+
{
24+
source: '/.well-known/atproto-did',
25+
headers: [
26+
{
27+
key: 'Content-Type',
28+
value: 'text/plain',
29+
},
30+
],
31+
},
32+
{
33+
source: '/(.*)',
34+
headers: [
35+
{
36+
key: 'X-Frame-Options',
37+
value: 'DENY',
38+
},
39+
{
40+
key: 'X-Content-Type-Options',
41+
value: 'nosniff',
42+
},
43+
{
44+
key: 'Referrer-Policy',
45+
value: 'strict-origin-when-cross-origin',
46+
},
47+
{
48+
key: 'X-XSS-Protection',
49+
value: '1; mode=block',
50+
},
51+
],
52+
},
53+
],
54+
} satisfies NextConfig
55+
56+
export default nextConfig

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"not op_mini all"
3131
],
3232
"scripts": {
33-
"dev": "next dev",
33+
"dev": "next dev --turbopack",
3434
"build": "next build",
3535
"start": "next start",
3636
"staging": "APP_ENV=staging next build && next start",

‎public/.well-known/atproto-did

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
did:plc:dclerniovgsh6pcya74imvbo

‎tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
},
3232
"include": [
3333
"next-env.d.ts",
34+
"next.config.ts",
3435
"**/*.ts",
3536
"**/*.tsx",
3637
"**/*.js",

0 commit comments

Comments
 (0)
Please sign in to comment.