Skip to content

Commit

Permalink
feat: add cors cookie support
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Mar 1, 2024
1 parent a7da1da commit 3b1a3b7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
6 changes: 6 additions & 0 deletions libs/zhi-blog-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# zhi-blog-api

## 1.56.0

### Minor Changes

- feat: add cors cookie support

## 1.55.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion libs/zhi-blog-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zhi-blog-api",
"version": "1.55.0",
"version": "1.56.0",
"type": "module",
"description": "a common blog interface",
"main": "./dist/index.js",
Expand Down
12 changes: 12 additions & 0 deletions libs/zhi-blog-api/src/lib/blogConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ abstract class BlogConfig {
*/
public corsAnywhereUrl?: string

/**
* cookie数组
*/
public corsCookieArray: string[]

/**
* cookie对象数组
*/
public corsCookieObjectArray: Record<string, any>[]

/**
* 是否启用用户名
*/
Expand Down Expand Up @@ -275,6 +285,8 @@ abstract class BlogConfig {
this.preferenceConfig = new PreferenceConfig()
this.middlewareUrl = ""
this.corsAnywhereUrl = ""
this.corsCookieArray = []
this.corsCookieObjectArray = []
this.usernameEnabled = false
this.showTokenTip = false
this.allowPreviewUrlChange = true
Expand Down
7 changes: 7 additions & 0 deletions libs/zhi-siyuan-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# zhi-siyuan-api

## 2.18.3

### Patch Changes

- Updated dependencies
- zhi-blog-api@1.56.0

## 2.18.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion libs/zhi-siyuan-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zhi-siyuan-api",
"version": "2.18.2",
"version": "2.18.3",
"type": "module",
"description": "a siyuan-note api including both kernel and client",
"main": "./dist/index.js",
Expand Down

0 comments on commit 3b1a3b7

Please sign in to comment.