Skip to content

Commit

Permalink
Use github logo link to reduce the usage of the server
Browse files Browse the repository at this point in the history
  • Loading branch information
mhdzumair committed Jun 24, 2023
1 parent 728cc1f commit b0a27bb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion artifacts/.well-known/ai-plugin-github.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"url": "http://localhost/openapi.json",
"is_user_authenticated": false
},
"logo_url": "http://localhost/artifacts/logo.png",
"logo_url": "https://raw.githubusercontent.com/mhdzumair/GitAIOps/main/artifacts/logo.png",
"contact_email": "[email protected]",
"legal_info_url": "http://localhost"
}
2 changes: 1 addition & 1 deletion artifacts/.well-known/ai-plugin-gitlab.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"url": "http://localhost/openapi.json",
"is_user_authenticated": false
},
"logo_url": "http://localhost/artifacts/logo.png",
"logo_url": "https://raw.githubusercontent.com/mhdzumair/GitAIOps/main/artifacts/logo.png",
"contact_email": "[email protected]",
"legal_info_url": "http://localhost"
}
10 changes: 0 additions & 10 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ async def ai_plugin(request: Request):

plugin_info.update(
{
"logo_url": f"{host_url}artifacts/logo.png",
"legal_info_url": f"{host_url}",
}
)
Expand All @@ -73,12 +72,3 @@ async def get_home():
"""
html_content = Path("artifacts/index.html").read_text(encoding="utf-8")
return html_content


@app.get("/artifacts/logo.png", include_in_schema=False)
async def read_logo():
"""
This endpoint returns the logo image file.
The image is read from the file system and returned as a file response.
"""
return FileResponse("artifacts/logo.png")

0 comments on commit b0a27bb

Please sign in to comment.