-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
👟 Reproduction steps
- Deploy an instance of Prompt ChatGPT template using appwrite function.
- Follow the deployment link and you will find that HTML page is not being rendered
Reason for issue
- The Content-Type received is
text/plain - Where as for rendering HTML content it should have been
text/html
Suggested Solution
Here in the current code context is parsing content-type as Content-Type which is causing this issue
if context.req.method == "GET":
return context.res.send(
get_static_file("index.html"),
200,
{
"Content-Type": "text/html; charset=utf-8"
}
)
To correct this we can change the Content-Type to content-type in the code that is
if context.req.method == "GET":
return context.res.send(
get_static_file("index.html"),
200,
{
"content-type": "text/html; charset=utf-8"
}
)
👍 Expected behavior
The expected behavior should have been the rendered HTML page like
👎 Actual Behavior
But the actual current behavior is showing unrendered raw HTML
🎲 Appwrite version
Appwrite Cloud
💻 Operating system
MacOS
🧱 Your Environment
Appwrite version 1.4.4, I haven't customized it any ways
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working