- CORS (Cross-Origin Resource Sharing) allows resources on a web page to be requested from another domain outside the domain from which the first resource was served.
- CORS uses additional HTTP headers to tell browsers to give a web application running at one origin access to selected resources from a different origin.
- Developer mistakes can lead to security vulnerabilities like cross-site request forgery if CORS is not implemented correctly, such as specifying '*' for allowed origins, failing to validate origins, or not handling credentials properly.
- CORS (Cross-Origin Resource Sharing) allows resources on a web page to be requested from another domain outside the domain from which the first resource was served.
- CORS uses additional HTTP headers to tell browsers to give a web application running at one origin access to selected resources from a different origin.
- Developer mistakes can lead to security vulnerabilities like cross-site request forgery if CORS is not implemented correctly, such as specifying '*' for allowed origins, failing to validate origins, or not handling credentials properly.
This document provides an introduction to Cross-Origin Resource Sharing (CORS), which defines a mechanism that enables client-side cross-origin requests. It discusses alternatives to CORS like JSONP and server-side proxies. It explains the CORS process, including how simple requests work directly and how preflight requests are used for more complex requests involving custom headers. It also provides browser support information and links to specifications and further resources about CORS.
CORS (Cross-Origin Resource Sharing) allows cross-origin HTTP requests from a browser. It works by using additional HTTP headers to tell browsers if a server allows requests from a different origin. Simple requests like GET, HEAD, and POST are allowed by default, but preflighted requests require the server to specify allowed origins, methods, and headers to the browser. The document provides examples of CORS requests and configurations for enabling CORS on an Apache server.
Cross site calls with javascript - the right way with CORSMichael Neale
Using CORS (cross origin resource sharing) you can easily and securely to cross site scripting in webapps - less servers and more integration from apis right in the browser
This was presented during Web Directions South, 2013, Sydney, Australia.
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a web page to be requested from another domain outside the domain from which the resource originated.
A web page may freely embed images, stylesheets, scripts, iframes, videos and some plugin content (such as Adobe Flash) from any other domain. However embedded web fonts and AJAX (XMLHttpRequest) requests have
traditionally been limited to accessing the same domain as the parent web page (as per the same-origin security policy). "Cross-domain" AJAX requests are forbidden by default because of their ability to perform
advanced requests (POST, PUT, DELETE and other types of HTTP requests, along with specifying custom HTTP headers) that introduce many cross-site scripting security issues.
CORS defines a way in which a browser and server can interact to determine safely whether or not to allow the cross-origin request. It allows for more freedom and functionality than purely
same-origin requests, but is more secure than simply allowing all cross-origin requests. It is a recommended standard of the W3C.
Александр Русаков - TypeScript 2 in actionMoscowJS
В докладе речь пойдет об основных нововведениях TypeScript 2.0 и 2.1 (literal types, discriminated unions, mapped types...) и их использовании в реальных проектах.
Виктор Розаев - Как не сломать обратную совместимость в Public APIMoscowJS
Представьте что у вас есть публичный JavaScript API. Им пользуются сторонние девелоперы от Индии до Канады, чтобы писать свои облачные сервисы. Эти сервисы продают телекомуникационные компании с многомиллиардными оборотами превышающими стоимость вашей компании. Любая остановка сервиса - миллионные убытки. Представили? А нам и представлять не надо - это наша работа. Добро пожаловать в нашу реальность. В рамках доклада мы расскажем о том, как сохранить обратную совместимость при активном развитии и неизвестных пользователях, ну и причем тут вообще интерны.
Контекст в React, Николай Надоричев, MoscowJS 31MoscowJS
Контекст стал документированной фичей сравнительно недавно, но его использование либо осуждается, либо не понимается. Такие библиотеки как react-redux или react-router успешно используют для своих нужд. В докладе рассмотрим основные аспекты работы с контекстом: зачем он нужен и какие проблемы решает.
Верстка Canvas, Алексей Охрименко, MoscowJS 31MoscowJS
Зачем? Как и когда нужно создавать пользовательский интерфейс с помощью Canvas и как обогнать React Native - обо всем этом вы узнаете из этого доклада.
Веб без интернет соединения, Михаил Дунаев, MoscowJS 31MoscowJS
This document discusses progressive web apps and how they can work offline through the use of service workers and caching. It provides examples of how to register a service worker to cache assets and provide offline fallback pages. It also covers how to implement features like sync, app manifests, and install prompts to make the web app experience more app-like.
Команда разработчиков Angular2 провела огромную работу над Change Detector, он стал быстрым и "умным". В докладе рассмотрим две основные фазы Angular2 приложения, куда все таки делся $apply(), и почему Angular2 обещает быть фантастически быстрым (в сравнении с AngularJs).
Создание WYSIWIG-редакторов для веба, Егор Яковишен, Setka, MoscowJs 33MoscowJS
В 2016 году интернет-изданиям недостаточно просто писать интересные материалы, нужно быстро и качественно их оформлять и показывать на разных устройствах. Я расскажу о нашем опыте создания JS-редактора, с помощью которого ежедневно публикуются десятки постов для 3 миллионов читателей.
"Опыт разработки универсальной библиотеки визуальных компонентов в HeadHunter...MoscowJS
При увеличении количества проектов в компании, разработчики сталкиваются с задачей унификации кодовой базы. Решением подобной задачи может быть библиотека, фреймворк или общий набор компонент. Такой инструмент позволит разработчикам сконцентрироваться только на новых задачах, избежать дублирования кода и повысить производительность.
В HeadHunter с такой задачей столкнулись в 2014 году. Решением данной проблемы стало создание унифицированной библиотеки компонент, которая успешно используется на всех проектах HH. В своем докладе я хотел бы поделиться опытом развития библиотеки, проблемами, которые возникали при разработке, и их последовательным решением.
"Во все тяжкие с responsive images", Павел Померанцев, MoscowJS 29MoscowJS
Разработчики давно ищут способы оптимизации размера изображения без потери качества. Если вы готовы пуститься во все тяжкие, я расскажу как это сделать. Профит гарантирован!
This document provides an introduction to Cross-Origin Resource Sharing (CORS), which defines a mechanism that enables client-side cross-origin requests. It discusses alternatives to CORS like JSONP and server-side proxies. It explains the CORS process, including how simple requests work directly and how preflight requests are used for more complex requests involving custom headers. It also provides browser support information and links to specifications and further resources about CORS.
CORS (Cross-Origin Resource Sharing) allows cross-origin HTTP requests from a browser. It works by using additional HTTP headers to tell browsers if a server allows requests from a different origin. Simple requests like GET, HEAD, and POST are allowed by default, but preflighted requests require the server to specify allowed origins, methods, and headers to the browser. The document provides examples of CORS requests and configurations for enabling CORS on an Apache server.
Cross site calls with javascript - the right way with CORSMichael Neale
Using CORS (cross origin resource sharing) you can easily and securely to cross site scripting in webapps - less servers and more integration from apis right in the browser
This was presented during Web Directions South, 2013, Sydney, Australia.
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a web page to be requested from another domain outside the domain from which the resource originated.
A web page may freely embed images, stylesheets, scripts, iframes, videos and some plugin content (such as Adobe Flash) from any other domain. However embedded web fonts and AJAX (XMLHttpRequest) requests have
traditionally been limited to accessing the same domain as the parent web page (as per the same-origin security policy). "Cross-domain" AJAX requests are forbidden by default because of their ability to perform
advanced requests (POST, PUT, DELETE and other types of HTTP requests, along with specifying custom HTTP headers) that introduce many cross-site scripting security issues.
CORS defines a way in which a browser and server can interact to determine safely whether or not to allow the cross-origin request. It allows for more freedom and functionality than purely
same-origin requests, but is more secure than simply allowing all cross-origin requests. It is a recommended standard of the W3C.
Александр Русаков - TypeScript 2 in actionMoscowJS
В докладе речь пойдет об основных нововведениях TypeScript 2.0 и 2.1 (literal types, discriminated unions, mapped types...) и их использовании в реальных проектах.
Виктор Розаев - Как не сломать обратную совместимость в Public APIMoscowJS
Представьте что у вас есть публичный JavaScript API. Им пользуются сторонние девелоперы от Индии до Канады, чтобы писать свои облачные сервисы. Эти сервисы продают телекомуникационные компании с многомиллиардными оборотами превышающими стоимость вашей компании. Любая остановка сервиса - миллионные убытки. Представили? А нам и представлять не надо - это наша работа. Добро пожаловать в нашу реальность. В рамках доклада мы расскажем о том, как сохранить обратную совместимость при активном развитии и неизвестных пользователях, ну и причем тут вообще интерны.
Контекст в React, Николай Надоричев, MoscowJS 31MoscowJS
Контекст стал документированной фичей сравнительно недавно, но его использование либо осуждается, либо не понимается. Такие библиотеки как react-redux или react-router успешно используют для своих нужд. В докладе рассмотрим основные аспекты работы с контекстом: зачем он нужен и какие проблемы решает.
Верстка Canvas, Алексей Охрименко, MoscowJS 31MoscowJS
Зачем? Как и когда нужно создавать пользовательский интерфейс с помощью Canvas и как обогнать React Native - обо всем этом вы узнаете из этого доклада.
Веб без интернет соединения, Михаил Дунаев, MoscowJS 31MoscowJS
This document discusses progressive web apps and how they can work offline through the use of service workers and caching. It provides examples of how to register a service worker to cache assets and provide offline fallback pages. It also covers how to implement features like sync, app manifests, and install prompts to make the web app experience more app-like.
Команда разработчиков Angular2 провела огромную работу над Change Detector, он стал быстрым и "умным". В докладе рассмотрим две основные фазы Angular2 приложения, куда все таки делся $apply(), и почему Angular2 обещает быть фантастически быстрым (в сравнении с AngularJs).
Создание WYSIWIG-редакторов для веба, Егор Яковишен, Setka, MoscowJs 33MoscowJS
В 2016 году интернет-изданиям недостаточно просто писать интересные материалы, нужно быстро и качественно их оформлять и показывать на разных устройствах. Я расскажу о нашем опыте создания JS-редактора, с помощью которого ежедневно публикуются десятки постов для 3 миллионов читателей.
"Опыт разработки универсальной библиотеки визуальных компонентов в HeadHunter...MoscowJS
При увеличении количества проектов в компании, разработчики сталкиваются с задачей унификации кодовой базы. Решением подобной задачи может быть библиотека, фреймворк или общий набор компонент. Такой инструмент позволит разработчикам сконцентрироваться только на новых задачах, избежать дублирования кода и повысить производительность.
В HeadHunter с такой задачей столкнулись в 2014 году. Решением данной проблемы стало создание унифицированной библиотеки компонент, которая успешно используется на всех проектах HH. В своем докладе я хотел бы поделиться опытом развития библиотеки, проблемами, которые возникали при разработке, и их последовательным решением.
"Во все тяжкие с responsive images", Павел Померанцев, MoscowJS 29MoscowJS
Разработчики давно ищут способы оптимизации размера изображения без потери качества. Если вы готовы пуститься во все тяжкие, я расскажу как это сделать. Профит гарантирован!
"AMP - технология на три буквы", Макс Фролов, MoscowJS 29MoscowJS
Для большинства пользователей мобильный интернет полон боли и страданий. При том что пользователей становится только больше — проблема не решается, а становится острее. Вас ожидает увлекательнейший доклад о том, как удалось разогнать до космической скорости мобильную Lenta.ru.
37. browser
POST/new
OPTIONS /new
Origin: http://m.ya.ru
Access-Control-Request-Method: POST
XHR
m.ya.ru
api.ya.ru
with
CORS
38. browser
POST/new
OPTIONS /new
Origin: http://m.ya.ru
Access-Control-Request-Method: POST
Access-Control-Allow-Methods: POST
XHR
m.ya.ru
api.ya.ru
with
CORS
39. browser
POST/new
OPTIONS /new
Origin: http://m.ya.ru
Access-Control-Request-Method: POST
Access-Control-Allow-Methods: POST
POST/new
XHR
m.ya.ru
api.ya.ru
with
CORS
40. browser
POST/new
OPTIONS /new
Origin: http://m.ya.ru
Access-Control-Request-Method: POST
Access-Control-Allow-Methods: POST
POST/new
<POST result>
XHR
m.ya.ru
api.ya.ru
with
CORS
41. browser
POST/new
OPTIONS /new
Origin: http://m.ya.ru
Access-Control-Request-Method: POST
Access-Control-Allow-Methods: POST
POST/new
<POST result>
<POST result>
XHR
m.ya.ru
api.ya.ru
with
CORS