Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
7ef22a41
Unverified
Commit
7ef22a41
authored
7 years ago
by
Richard van der Hoff
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #2707 from matrix-org/rav/fix_urlpreview
Fix OPTIONS on preview_url
parents
96387bd2
8132a6b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/rest/media/v1/preview_url_resource.py
+5
-1
5 additions, 1 deletion
synapse/rest/media/v1/preview_url_resource.py
with
5 additions
and
1 deletion
synapse/rest/media/v1/preview_url_resource.py
+
5
−
1
View file @
7ef22a41
...
...
@@ -25,7 +25,8 @@ from synapse.util.stringutils import random_string
from
synapse.util.caches.expiringcache
import
ExpiringCache
from
synapse.http.client
import
SpiderHttpClient
from
synapse.http.server
import
(
request_handler
,
respond_with_json_bytes
request_handler
,
respond_with_json_bytes
,
respond_with_json
,
)
from
synapse.util.async
import
ObservableDeferred
from
synapse.util.stringutils
import
is_ascii
...
...
@@ -78,6 +79,9 @@ class PreviewUrlResource(Resource):
self
.
_expire_url_cache_data
,
10
*
1000
)
def
render_OPTIONS
(
self
,
request
):
return
respond_with_json
(
request
,
200
,
{},
send_cors
=
True
)
def
render_GET
(
self
,
request
):
self
.
_async_render_GET
(
request
)
return
NOT_DONE_YET
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment