Skip to content

Commit 28dd5a0

Browse files
committed
cross-origin-errors kr translate
1 parent 4daa062 commit 28dd5a0

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

Diff for: content/docs/cross-origin-errors.md

+15-14
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,39 @@ title: Cross-origin Errors
44
permalink: docs/cross-origin-errors.html
55
---
66

7-
> Note:
7+
> 주의:
88
>
9-
> The following section applies only to the development mode of React. Error handling in production mode is done with regular try/catch statements.
9+
> 해당 부분은 오직 리액트 개발 모드에서만 적용됩니다. 배포 모드에서 오류 처리는 일반 try/catch 구문으로 수행됩니다.
1010
11-
In [development mode](/docs/optimizing-performance.html), React uses a global `error` event handler to preserve the "pause on exceptions" behavior of browser DevTools. It also logs errors to the developer console.
11+
[개발 모드](/docs/optimizing-performance.html)에서 리액트는 전역 `오류` 이벤트 핸들러를 사용하여 브라우저 DevTools의 "예외 시 일시 중지" 동작을 유지해줍니다. 또한 개발자 콘솔에 오류를 기록합니다.
1212

13-
If an error is thrown from a [different origin](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) the browser will mask its details and React will not be able to log the original error message. This is a security precaution taken by browsers to avoid leaking sensitive information.
13+
[다른 출처](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)로 인한 오류가 발생한다면 브라우저는 해당 세부 정보를 숨기고 리액트는 오리지널 오류 메시지를 기록할 수가 없습니다. 왜냐하면 민감한 정보가 노출되는 것을 방지하기 위해서 브라우저에서 보안 예방 조치 취하기 때문입니다.
1414

15-
You can simplify the development/debugging process by ensuring that errors are thrown with a same-origin policy. Below are some common causes of cross-origin errors and ways to address them.
15+
동일 출처 정책으로 오류가 발생하도록 개발/디버깅 프로세스를 단순화할 수 있습니다. 다음은 교차 출처 오류가 발생하는 일반적인 원인과 해결 방법입니다.
1616

1717
### CDN {#cdn}
1818

19-
When loading React (or other libraries that might throw errors) from a CDN, add the [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute to your `<script>` tags:
19+
CDN에서 리액트(혹은 오류를 발생시킬 수 있는 다른 라이브러리)를 로딩할 때, `<script>` 태그에 [`크로스오리진`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) 속성을 추가하세요:
20+
2021

2122
```html
2223
<script crossorigin src="..."></script>
2324
```
2425

25-
Also ensure the CDN responds with the `Access-Control-Allow-Origin: *` HTTP header:
26+
또한 CDN이 `Access-Control-Allow-Origin: *` HTTP 헤더로 응답하는지 확인합니다.
2627

2728
![Access-Control-Allow-Origin: *](../images/docs/cdn-cors-header.png)
2829

29-
### Webpack {#webpack}
30+
### 웹팩 {#webpack}
3031

31-
#### Source maps {#source-maps}
32+
#### 소스 맵 {#source-maps}
3233

33-
Some JavaScript bundlers may wrap the application code with `eval` statements in development. (For example Webpack will do this if [`devtool`](https://webpack.js.org/configuration/devtool/) is set to any value containing the word "eval".) This may cause errors to be treated as cross-origin.
34+
일부 자바스크립트 번들러는 개발 중에 `eval`문으로 코드를 래핑 되어 있을 수 있습니다. (예를 들어 웹팩은 [`devtool`](https://webpack.js.org/configuration/devtool/)이 "eval"이라는 단어가 포함된 값으로 설정된 경우 이 작업을 수행합니다) 이로 인해 크로스-오리진 오류로 처리될 수 있습니다.
3435

35-
If you use Webpack, we recommend using the `cheap-module-source-map` setting in development to avoid this problem.
36+
웹팩을 사용하는 경우, 이러한 문제를 피하기 위해서 개발 시에 `cheap-module-source-map` 설장하는 것을 추천합니다.
3637

37-
#### Code splitting {#code-splitting}
38+
#### 코드 분할 {#code-splitting}
3839

39-
If your application is split into multiple bundles, these bundles may be loaded using JSONP. This may cause errors thrown in the code of these bundles to be treated as cross-origin.
40+
애플리케이션이 여러 번들로 분할된 경우 JSONP를 사용하여 로드될 수 있습니다. 이로 인해 번들 된 코드가 크로스-오리진 오류로 처리될 수도 있습니다.
4041

41-
To resolve this, use the [`crossOriginLoading`](https://webpack.js.org/configuration/output/#output-crossoriginloading) setting in development to add the `crossorigin` attribute to the `<script>` tags generated for the JSONP requests.
42+
이러한 문제를 해결하려면, 개발 시에 [`크로스오리진로딩`](https://webpack.js.org/configuration/output/#output-crossoriginloading) 설정을 사용하여 JSOPN 요청에 대해 생성된 `<script>` 태그에 `크로스오리진` 속성을 추가하세요.

0 commit comments

Comments
 (0)