
--- client/views/component/ckeditor5/UploadAdapter.js
+++ client/views/component/ckeditor5/UploadAdapter.js
... | ... | @@ -1,3 +1,4 @@ |
1 |
+import filters from '../../common/filters'; |
|
1 | 2 |
export default class UploadAdapter { |
2 | 3 |
constructor(loader) { |
3 | 4 |
this.loader = loader; |
... | ... | @@ -13,7 +14,7 @@ |
13 | 14 |
|
14 | 15 |
_initRequest() { |
15 | 16 |
const xhr = this.xhr = new XMLHttpRequest(); |
16 |
- xhr.open('POST', '/sys/file/postImageUpload.file', true); |
|
17 |
+ xhr.open('POST', filters.ctxPath('/sys/file/postImageUpload.file'), true); |
|
17 | 18 |
xhr.responseType = 'json'; |
18 | 19 |
} |
19 | 20 |
|
--- server/modules/web/server.js
+++ server/modules/web/server.js
... | ... | @@ -121,6 +121,21 @@ |
121 | 121 |
}) |
122 | 122 |
); |
123 | 123 |
|
124 |
+// 이미지 URL 요청 프록시 (브라우저 <img src=...> 대응) |
|
125 |
+webServer.use( |
|
126 |
+ "/editFileUpload", |
|
127 |
+ expressProxy(API_SERVER_HOST, { |
|
128 |
+ proxyReqPathResolver: (req) => req.originalUrl |
|
129 |
+ }) |
|
130 |
+); |
|
131 |
+// 파일 URL 요청 프록시 |
|
132 |
+webServer.use( |
|
133 |
+ "/fileUpload", |
|
134 |
+ expressProxy(API_SERVER_HOST, { |
|
135 |
+ proxyReqPathResolver: (req) => req.originalUrl |
|
136 |
+ }) |
|
137 |
+); |
|
138 |
+ |
|
124 | 139 |
/** |
125 | 140 |
* @author : 하석형 |
126 | 141 |
* @since : 2023.08.24 |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?