🌐 feat: enable cors

This commit is contained in:
Florian Hönicke
2023-05-15 10:54:32 +02:00
parent 53ae1d6f4c
commit 1b0c2d5461
3 changed files with 3 additions and 1 deletions

View File

@@ -61,7 +61,7 @@ Description of the microservice:
context,
microservice_description,
condition_question='Does the microservice send requests to an API?',
question_gen='Generate a question that asks for the endpoint and an example of a request and response when interacting with the external API.',
question_gen='Generate a question that asks for the endpoint of the external API and an example of a request and response when interacting with the external API.',
extension_name='Example of API usage',
post_transformation_fn=translation(from_format='api instruction', to_format='python code snippet raw without formatting')
)

View File

@@ -79,6 +79,7 @@ class CustomGateway(CompositeGateway):
f'Please, let http port ({http_port}) be 8080 for nginx to work'
)
kwargs['runtime_args']['port'][http_idx] = 8082
kwargs['cors'] = True
super().__init__(**kwargs)
# remove potential clashing arguments from kwargs

View File

@@ -1,3 +1,4 @@
streamlit==1.16.0
altair==4.2.2
extra-streamlit-components==0.1.55
jina==3.15.1.dev14