@atproto/pds 0.4.27 → 0.4.28

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atproto/pds
2
2
 
3
+ ## 0.4.28
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2522](https://github.com/bluesky-social/atproto/pull/2522) [`53551be6c`](https://github.com/bluesky-social/atproto/commit/53551be6cf092a9b4d2e132788b94ac0d4ffcecc) Thanks [@devinivy](https://github.com/devinivy)! - Set max-age CORS header to max practical value
8
+
3
9
  ## 0.4.27
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -108,7 +108,7 @@ class PDS {
108
108
  static async create(cfg, secrets, overrides) {
109
109
  const app = (0, express_1.default)();
110
110
  app.set('trust proxy', true);
111
- app.use((0, cors_1.default)());
111
+ app.use((0, cors_1.default)({ maxAge: common_1.DAY / common_1.SECOND }));
112
112
  app.use(logger_1.loggerMiddleware);
113
113
  app.use((0, compression_1.default)());
114
114
  const ctx = await context_1.default.fromConfig(cfg, secrets, overrides);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,sDAAsD;AACtD,mDAAmD;AACnD,+CAA+C;AAC/C,gCAA6B;AAE7B,sDAA6B;AAC7B,gDAAuB;AAEvB,oDAA2B;AAE3B,4CAAmD;AACnD,gDAAuB;AACvB,4DAA6C;AAC7C,wDAAyC;AACzC,+CAAgC;AAChC,qCAA2C;AAE3C,uCAAwC;AACxC,qDAAsE;AACtE,wDAAyD;AACzD,qEAA4C;AAC5C,+CAA4C;AAE5C,2CAAwB;AACxB,2BAA+B;AAAtB,8FAAA,QAAQ,OAAA;AACjB,mDAAgD;AAAvC,+GAAA,aAAa,OAAA;AACtB,qCAAsC;AAA7B,qGAAA,UAAU,OAAA;AACnB,mCAAqC;AAA5B,oGAAA,UA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AG,KAAK,CAAA;QACpC,IAAI,CAAC,UAAU,GAAG,IAAA,sCAAoB,EAAC,EAAE,MAAM,EAAE,CAAC,CAAA;QAClD,MAAM,gBAAM,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;QACtC,OAAO,MAAM,CAAA;IACf,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,CAAA;QAClC,MAAM,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,CAAA;QAClC,MAAM,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,EAAE,CAAA;QACxC,MAAM,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,CAAA;QACrC,MAAM,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,CAAA;QACnC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;QACnC,aAAa,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;IAC5C,CAAC;CACF;AA9FD,kBA8FC;AAED,kBAAe,GAAG,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/pds",
3
- "version": "0.4.27",
3
+ "version": "0.4.28",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of atproto Personal Data Server (PDS)",
6
6
  "keywords": [
@@ -71,7 +71,7 @@
71
71
  "ts-node": "^10.8.2",
72
72
  "ws": "^8.12.0",
73
73
  "@atproto/api": "^0.12.13",
74
- "@atproto/bsky": "^0.0.55",
74
+ "@atproto/bsky": "^0.0.56",
75
75
  "@atproto/lex-cli": "^0.4.0"
76
76
  },
77
77
  "scripts": {
package/src/index.ts CHANGED
@@ -9,7 +9,7 @@ import cors from 'cors'
9
9
  import http from 'http'
10
10
  import events from 'events'
11
11
  import { Options as XrpcServerOptions } from '@atproto/xrpc-server'
12
- import { DAY, HOUR, MINUTE } from '@atproto/common'
12
+ import { DAY, HOUR, MINUTE, SECOND } from '@atproto/common'
13
13
  import API from './api'
14
14
  import * as basicRoutes from './basic-routes'
15
15
  import * as wellKnown from './well-known'
@@ -54,7 +54,7 @@ export class PDS {
54
54
  ): Promise<PDS> {
55
55
  const app = express()
56
56
  app.set('trust proxy', true)
57
- app.use(cors())
57
+ app.use(cors({ maxAge: DAY / SECOND }))
58
58
  app.use(loggerMiddleware)
59
59
  app.use(compression())
60
60