Skip to content

Commit

Permalink
merge 1.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ricwo committed Oct 9, 2019
2 parents f3c9db0 + f96b50b commit 5b5f3d2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Rasa Change Log
All notable changes to this project will be documented in this file.
This project adheres to `Semantic Versioning`_ starting with version 1.0.

[Unreleased 1.3.8]
[Unreleased 1.3.9]
^^^^^^^^^^^^^^^^^^

Added
Expand All @@ -22,6 +22,19 @@ Added
- Added ability to define the RabbitMQ port using the ``port`` key in the
``event_broker`` endpoint config.

Fixed
-----

Changed
-------

Removed
-------


[1.3.8] - 2019-10-08
^^^^^^^^^^^^^^^^^^^^

Changed
-------
- Policies now only get imported if they are actually used. This removes
Expand All @@ -32,6 +45,8 @@ Fixed
- Fixed error ``Object of type 'MaxHistoryTrackerFeaturizer' is not JSON serializable``
when running ``rasa train core``
- Default channel ``send_`` methods no longer support kwargs as they caused issues in incompatible channels
- Fixed ``argument of type 'NoneType' is not iterable`` when using ``rasa shell``,
``rasa interactive`` / ``rasa run``

[1.3.7] - 2019-09-27
^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion rasa/core/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ def handle_channels(
channels: List[InputChannel],
http_port: int = constants.DEFAULT_SERVER_PORT,
route: Text = "/webhooks/",
cors=None,
cors: Union[Text, List[Text], None] = None,
) -> Sanic:
"""Start a webserver attaching the input channels and handling msgs."""

Expand Down
2 changes: 1 addition & 1 deletion rasa/core/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _create_app_without_api(cors: Optional[Union[Text, List[Text]]] = None):

def configure_app(
input_channels: Optional[List["InputChannel"]] = None,
cors: Optional[Union[Text, List[Text]]] = None,
cors: Optional[Union[Text, List[Text], None]] = None,
auth_token: Optional[Text] = None,
enable_api: bool = True,
jwt_secret: Optional[Text] = None,
Expand Down
10 changes: 7 additions & 3 deletions rasa/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,15 +337,19 @@ async def _load_agent(
return loaded_agent


def configure_cors(app: Sanic, cors_origins: Union[Text, List[Text]] = "") -> None:
def configure_cors(
app: Sanic, cors_origins: Union[Text, List[Text], None] = ""
) -> None:
"""Configure CORS origins for the given app."""

# Workaround so that socketio works with requests from other origins.
# https://github.com/miguelgrinberg/python-socketio/issues/205#issuecomment-493769183
app.config.CORS_AUTOMATIC_OPTIONS = True
app.config.CORS_SUPPORTS_CREDENTIALS = True

CORS(app, resources={r"/*": {"origins": cors_origins}}, automatic_options=True)
CORS(
app, resources={r"/*": {"origins": cors_origins or ""}}, automatic_options=True
)


def add_root_route(app: Sanic):
Expand All @@ -357,7 +361,7 @@ async def hello(request: Request):

def create_app(
agent: Optional["Agent"] = None,
cors_origins: Union[Text, List[Text]] = "*",
cors_origins: Union[Text, List[Text], None] = "*",
auth_token: Optional[Text] = None,
jwt_secret: Optional[Text] = None,
jwt_method: Text = "HS256",
Expand Down
2 changes: 1 addition & 1 deletion rasa/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.3.7"
__version__ = "1.3.8"

0 comments on commit 5b5f3d2

Please sign in to comment.